소스 검색

Merge branch 'msg-op-pass-ordering' into maint

* msg-op-pass-ordering:
  When using msg OP, check for and allow '#chan PASS' as well as 'PASS #chan'

Conflicts:
	doc/UPDATES
Bryan Drewery 13 년 전
부모
커밋
bfc754fc21
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      doc/UPDATES
  2. 5 0
      src/mod/irc.mod/msgcmds.c

+ 1 - 0
doc/UPDATES

@@ -4,6 +4,7 @@ maint
   * Show a nicer compile error when BUILDTS unable to be determined / gmake is not used.
   * Show 'Do!' in 'chaninfo' for 'Voice-moderate' to be consistent with other flags.
   * Fix CALLERID not respecting ignores (#63)
+  * 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.

+ 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]) {