aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-14 19:25:00 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-14 19:25:00 +0100
commitedf965753380a165ec615b79d45251931ac3ea62 (patch)
tree37c8afac24980f9ce4092ec755a38c76c0120b5a /irc.c
parentc22c210f560aee8a43b9fbff63c3dc408b434094 (diff)
Fixed the PASS-command, added error messages for invalid commands to irc_exec().
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/irc.c b/irc.c
index 2339af71..da6a70c7 100644
--- a/irc.c
+++ b/irc.c
@@ -574,6 +574,28 @@ void irc_names( irc_t *irc, char *channel )
irc_reply( irc, 366, "%s :End of /NAMES list", channel );
}
+int irc_check_login( irc_t *irc )
+{
+ if( irc->user && irc->nick )
+ {
+ if( global.conf->authmode == AUTHMODE_CLOSED && irc->status < USTATUS_AUTHORIZED )
+ {
+ irc_reply( irc, 464, ":This server is password-protected." );
+ return 0;
+ }
+ else
+ {
+ irc_login( irc );
+ return 1;
+ }
+ }
+ else
+ {
+ /* More information needed. */
+ return 0;
+ }
+}
+
void irc_login( irc_t *irc )
{
user_t *u;