Răsfoiți Sursa

* Port [3387] to 1.2.14
* Fix authing on non-chathubs (fixes #356)



svn: 3388

Bryan Drewery 19 ani în urmă
părinte
comite
e65601bf34
2 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 1 0
      doc/UPDATES
  2. 6 1
      src/mod/irc.mod/msgcmds.c

+ 1 - 0
doc/UPDATES

@@ -41,6 +41,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Remove chanflag 'protectops'
 * Fix bot not checking +e/+I modes when opped sometimes.
 * Fix chanset flag 'userbans' not being saved correctly. (may cause warnings on upgrade)
+* Fix authing on non-chathubs (fixes #356)
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 6 - 1
src/mod/irc.mod/msgcmds.c

@@ -287,13 +287,18 @@ static void logc(const char *cmd, Auth *a, char *chname, char *par)
   
 static int msg_authstart(char *nick, char *host, struct userrec *u, char *par)
 {
-  if (!u) 
+  if (!u)
     return 0;
   if (match_my_nick(nick))
     return BIND_RET_BREAK;
   if (u && u->bot)
     return BIND_RET_BREAK;
 
+  if (!ischanhub()) {
+    putlog(LOG_WARN, "*", "(%s!%s) !%s! Attempted AUTH? (I'm not a chathub (+c))", nick, host, u->handle);
+    return BIND_RET_BREAK;
+  }
+
   putlog(LOG_CMDS, "*", "(%s!%s) !%s! AUTH?", nick, host, u->handle);
 
   Auth *auth = Auth::Find(host);