1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 07:13:14 +02:00

inspircd12: fix mode handler to handle opers changing other users umodes correctly

This commit is contained in:
Adam
2016-12-01 19:10:46 -05:00
parent 12515fd2c1
commit 95cd7a6aee
+1 -6
View File
@@ -1147,12 +1147,7 @@ struct IRCDMessageMode : IRCDMessage
users modes, we have to kludge this
as it slightly breaks RFC1459
*/
User *u = source.GetUser();
// This can happen with server-origin modes.
if (!u)
u = User::Find(params[0]);
// if it's still null, drop it like fire.
// most likely situation was that server introduced a nick which we subsequently akilled
User *u = User::Find(params[0]);
if (u)
u->SetModesInternal(source, "%s", params[1].c_str());
}