Skip to content
Snippets Groups Projects
Commit aa110920 authored by William Pitcock's avatar William Pitcock
Browse files

nickserv/enforce: do not check if a non-existent user is banned from a channel

parent ab281b1f
No related branches found
No related tags found
No related merge requests found
......@@ -309,8 +309,8 @@ static void ns_cmd_regain(sourceinfo_t *si, int parc, char *parv[])
}
if ((si->smu == mn->owner) || verify_password(mn->owner, password))
{
if (user_is_channel_banned(si->su, 'b') || user_is_channel_banned(si->su, 'q') ||
user_is_channel_banned(u, 'b') || user_is_channel_banned(u, 'q'))
if ((si->su != NULL && user_is_channel_banned(si->su, 'b') || user_is_channel_banned(si->su, 'q')) ||
user_is_channel_banned(u, 'b') || user_is_channel_banned(u, 'q')))
{
command_fail(si, fault_noprivs, _("You can not regain your nickname while banned or quieted on a channel."));
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment