aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
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;