add PASS support - irc - Unnamed repository; edit this file 'description' to name the repository.
 (HTM) git clone git://vernunftzentrum.de/irc.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 0cfe3fad8f593bcf11d495d90f158afd567b1984
 (DIR) parent 1d3c109eb02c514ecedda65cd1bda5256ef0c6c2
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Thu,  9 Jun 2016 20:54:35 +0200
       
       add PASS support
       
       Diffstat:
         irc.c                               |       5 ++++-
       
       1 file changed, 4 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/irc.c b/irc.c
       @@ -756,11 +756,12 @@ main(int argc, char *argv[])
        {
                const char *user = getenv("USER");
                const char *ircnick = getenv("IRCNICK");
       +        const char *key = getenv("IRCPASS");
                const char *server = SRV;
                const char *port = PORT;
                int o;
        
       -        while ((o = getopt(argc, argv, "hn:u:s:p:l:")) >= 0)
       +        while ((o = getopt(argc, argv, "hk:n:u:s:p:l:")) >= 0)
                        switch (o) {
                        case 'h':
                        case '?':
       @@ -795,6 +796,8 @@ main(int argc, char *argv[])
                tinit();
                sfd = dial(server, port);
                chadd("*server*", 1);
       +        if (key)
       +                sndf("PASS %s", key);
                sndf("NICK %s", nick);
                sndf("USER %s 8 * :%s", user, user);
                sndf("MODE %s +i", nick);