From 8c76e73bcfecb2aa4920a4af67576fa5d1d49f51 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Wed, 19 Jan 2011 15:15:55 -0500 Subject: [PATCH] commit c90f903a667ed5744b93b6b89892de4e8c045d17 Author: Stephen Bennett Date: Fri Dec 31 17:14:05 2010 +0000 Expire umode +p correctly if it's set via oper_umodes, as well as by user_mode. Bug found by tgies. --- src/s_user.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/s_user.c b/src/s_user.c index 04dcef7..1fc9661 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1430,6 +1430,13 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) user_join(&me, source_p, aconf->autojoin_opers, NULL); } + /* If we're setting +p, expire it */ + if(ConfigFileEntry.expire_override_time && MyClient(source_p) && source_p->umodes & UMODE_OVERRIDE) + { + source_p->localClient->override_timeout_event = + rb_event_addonce("expire_override", expire_umode_p, source_p, ConfigFileEntry.expire_override_time); + } + return (1); }