Преглед изворни кода

When using msg OP, check for and allow '#chan PASS' as well as 'PASS #chan'

Bryan Drewery пре 13 година
родитељ
комит
d29565f9c1
2 измењених фајлова са 7 додато и 0 уклоњено
  1. 2 0
      doc/UPDATES
  2. 5 0
      src/mod/irc.mod/msgcmds.c

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* When using msg OP, check for and allow '#chan PASS' as well as 'PASS #chan'
+
 1.4.1 - http://wraith.botpack.net/milestone/1.4.1
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
   * Remove 'chanset +meankicks'. You can customize your kicks in doc/responses.txt and recompile.

+ 5 - 0
src/mod/irc.mod/msgcmds.c

@@ -130,6 +130,11 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
     return BIND_RET_BREAK;
   pass = newsplit(&par);
 
+  /* Check if they used the wrong order */
+  if (!u_pass_match(u, pass) && u_pass_match(u, par)) {
+    std::swap(pass, par);
+  }
+
   bd::String msg;
 
   if (homechan[0]) {