summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-02-09 22:00:16 +0000
committererdgeist <>2007-02-09 22:00:16 +0000
commitf3f5eb2be53fa14e84ed563c229098c0fcd290f5 (patch)
tree963d27ad4e35d513b3f8a025dba4ac1b073a9459
parent15e849dc81463198636a831fadca1ee140836fa3 (diff)
Trying a login script...
-rwxr-xr-xvchat-config.h49
-rwxr-xr-xvchat-protocol.c2
-rwxr-xr-xvchat.h2
3 files changed, 27 insertions, 26 deletions
diff --git a/vchat-config.h b/vchat-config.h
index ce9c72d..d494736 100755
--- a/vchat-config.h
+++ b/vchat-config.h
@@ -28,30 +28,31 @@ extern unsigned int usetime;
28extern unsigned int hscroll; 28extern unsigned int hscroll;
29 29
30static volatile configoption configoptions[] = { 30static volatile configoption configoptions[] = {
31/* config-option type name in file default value value localvar */ 31/* config-option type name in file default value value localvar */
32 {CF_NICK, CO_STR, "nick", NULL, NULL, { .pstr = &nick } }, 32 {CF_NICK, CO_STR, "nick", NULL, NULL, { .pstr = &nick } },
33 {CF_FROM, CO_STR, "from", "vc-alpha-0.16", NULL, { NULL } }, 33 {CF_FROM, CO_STR, "from", "vc-alpha-0.16", NULL, { NULL } },
34 {CF_SERVERHOST, CO_STR, "host", "pulse.flatline.de",NULL, { NULL } }, 34 {CF_SERVERHOST, CO_STR, "host", "pulse.flatline.de", NULL, { NULL } },
35 {CF_SERVERPORT, CO_STR, "port", "2325", NULL, { NULL } }, 35 {CF_SERVERPORT, CO_STR, "port", "2325", NULL, { NULL } },
36 {CF_CIPHERSUITE, CO_STR, "ciphers", "HIGH:MEDIUM", NULL, { NULL } }, 36 {CF_CIPHERSUITE, CO_STR, "ciphers", "HIGH:MEDIUM", NULL, { NULL } },
37 {CF_CONFIGFILE, CO_STR, "conffile", "~/.vchat/config", NULL, { NULL } }, 37 {CF_CONFIGFILE, CO_STR, "conffile", "~/.vchat/config", NULL, { NULL } },
38 {CF_CERTFILE, CO_STR, "certfile", "~/.vchat/cert", NULL, { NULL } }, 38 {CF_CERTFILE, CO_STR, "certfile", "~/.vchat/cert", NULL, { NULL } },
39 {CF_KEYFILE, CO_STR, "keyfile", "~/.vchat/key", NULL, { NULL } }, 39 {CF_KEYFILE, CO_STR, "keyfile", "~/.vchat/key", NULL, { NULL } },
40 {CF_FORMFILE, CO_STR, "formatfile", "~/.vchat/formats", NULL, { NULL } }, 40 {CF_FORMFILE, CO_STR, "formatfile", "~/.vchat/formats", NULL, { NULL } },
41 {CF_ENCODING, CO_STR, "encoding", NULL, NULL, { .pstr = &encoding }}, 41 {CF_LOGINSCRIPT, CO_STR, "loginscript","~/.vchat/loginscript", NULL, { NULL } },
42 {CF_USESSL, CO_INT, "usessl", (char *) 1, (char *)-1, { .pint = &usessl } }, 42 {CF_ENCODING, CO_STR, "encoding", NULL, NULL, { .pstr = &encoding }},
43 {CF_USECERT, CO_INT, "usecert", (char *) 1, (char *)-1, { NULL } }, 43 {CF_USESSL, CO_INT, "usessl", (char *) 1, (char *)-1, { .pint = &usessl } },
44 {CF_USETIME, CO_INT, "usetime", (char *) 1, (char *)-1, { .pint = &usetime } }, 44 {CF_USECERT, CO_INT, "usecert", (char *) 1, (char *)-1, { NULL } },
45 {CF_USETOPIC, CO_INT, "usetopicbar",(char *) 1, (char *)-1, { NULL } }, 45 {CF_USETIME, CO_INT, "usetime", (char *) 1, (char *)-1, { .pint = &usetime } },
46 {CF_PRIVHEIGHT, CO_INT, "messages", (char *) 0, (char *)-1, { NULL } }, 46 {CF_USETOPIC, CO_INT, "usetopicbar",(char *) 1, (char *)-1, { NULL } },
47 {CF_HSCROLL, CO_INT, "hscroll", (char *) 5, (char *)-1, { .pint = &hscroll } }, 47 {CF_PRIVHEIGHT, CO_INT, "messages", (char *) 0, (char *)-1, { NULL } },
48 {CF_CHANNEL, CO_INT, "channel", (char *) 0, (char *)-1, { NULL } }, 48 {CF_HSCROLL, CO_INT, "hscroll", (char *) 5, (char *)-1, { .pint = &hscroll } },
49 {CF_SCROLLBPRIV, CO_INT, "privscrollb",(char *) 2048, (char *)-1, { NULL } }, 49 {CF_CHANNEL, CO_INT, "channel", (char *) 0, (char *)-1, { NULL } },
50 {CF_SCROLLBACK, CO_INT, "scrollback", (char *) 8192, (char *)-1, { NULL } }, 50 {CF_SCROLLBPRIV, CO_INT, "privscrollb",(char *) 2048, (char *)-1, { NULL } },
51 {CF_SCROLLBPRIVT,CO_INT, "privscrollt",(char *) 0, (char *)-1, { NULL } }, 51 {CF_SCROLLBACK, CO_INT, "scrollback", (char *) 8192, (char *)-1, { NULL } },
52 {CF_SCROLLBACKT, CO_INT, "scrolltime", (char *) 86400, (char *)-1, { NULL } }, 52 {CF_SCROLLBPRIVT,CO_INT, "privscrollt",(char *) 0, (char *)-1, { NULL } },
53 {CF_BELLPRIV, CO_INT, "bellonpm", (char *) 0, (char *)-1, { NULL } }, 53 {CF_SCROLLBACKT, CO_INT, "scrolltime", (char *) 86400, (char *)-1, { NULL } },
54 {CF_NIL, CO_NIL, NULL, NULL, NULL, { NULL } }, 54 {CF_BELLPRIV, CO_INT, "bellonpm", (char *) 0, (char *)-1, { NULL } },
55 {CF_NIL, CO_NIL, NULL, NULL, NULL, { NULL } },
55}; 56};
56 57
57/* 58/*
diff --git a/vchat-protocol.c b/vchat-protocol.c
index 5554796..c1e88c5 100755
--- a/vchat-protocol.c
+++ b/vchat-protocol.c
@@ -564,7 +564,7 @@ justloggedin (char *message)
564 /* we're not logged in, change status and request nicks */ 564 /* we're not logged in, change status and request nicks */
565 if (!loggedin) 565 if (!loggedin)
566 { 566 {
567 networkoutput (".S"); 567 loadcfg(getstroption(CF_LOGINSCRIPT),handleline);
568 loggedin = 1; 568 loggedin = 1;
569 } 569 }
570} 570}
diff --git a/vchat.h b/vchat.h
index 60d485d..2cc4e12 100755
--- a/vchat.h
+++ b/vchat.h
@@ -36,7 +36,7 @@ typedef struct servermessage servermessage;
36/* configuration types and variable numbers */ 36/* configuration types and variable numbers */
37typedef enum { CO_NIL, CO_STR, CO_INT } conftype; 37typedef enum { CO_NIL, CO_STR, CO_INT } conftype;
38typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT, 38typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT,
39CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE, 39CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE, CF_LOGINSCRIPT,
40CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME, 40CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME,
41CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT, 41CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT,
42CF_ENCODING, CF_BELLPRIV } confopt; 42CF_ENCODING, CF_BELLPRIV } confopt;