* msg-op-pass-ordering: When using msg OP, check for and allow '#chan PASS' as well as 'PASS #chan' Conflicts: doc/UPDATES
@@ -3,6 +3,7 @@ next
* Properly honor exemptions when kicking matched RBL clients
* Fix LASTON not being shared
* Warn when using 'chattr +a' as some users may expect it to be auto-op
+ * When using msg OP, check for and allow '#chan PASS' as well as 'PASS #chan'
maint
* Prevent crashing on startup if openssl can not be loaded
@@ -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]) {