Merge branch '1.6.x'

This commit is contained in:
J-P Nurmi
2015-09-09 18:49:47 +02:00
+20
View File
@@ -191,6 +191,26 @@ public:
return false;
}
EModRet OnRaw(CString& sLine) override {
CString sNumeric = sLine.Token(1);
if (sNumeric.Equals("479")) {
// ERR_BADCHANNAME (juped channels or illegal channel name - ircd hybrid)
// prevent the module from getting into an infinite loop of trying to join it.
// :irc.network.net 479 mynick #channel :Illegal channel name
CString sChannel = sLine.Token(3);
for (MCString::iterator it = BeginNV(); it != EndNV(); ++it) {
if (sChannel.Equals(it->first)) {
PutModule("Channel [" + sChannel + "] cannot be joined, it is an illegal channel name. Unsticking.");
OnUnstickCommand("unstick " + sChannel);
return CONTINUE;
}
}
}
return CONTINUE;
}
};