From 8d99003c221b7d6dcc04d0fc58629c243b48dbf0 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 8 Aug 2006 15:05:49 +0000 Subject: AddOper() and DeleteOper() -> userrec::Oper() and userrec::UnOper() (these do more, too) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4792 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_oper.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/cmd_oper.cpp') diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp index f695c44f8..078150565 100644 --- a/src/cmd_oper.cpp +++ b/src/cmd_oper.cpp @@ -101,7 +101,6 @@ void cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host); return; } - strlcpy(user->oper,TypeName,NICKMAX-1); found = true; fail2 = false; break; @@ -117,14 +116,7 @@ void cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) WriteOpers("*** %s (%s@%s) is now an IRC operator of type %s",user->nick,user->ident,user->host,OperType); WriteServ(user->fd,"381 %s :You are now an IRC operator of type %s",user->nick,OperType); if (!user->modes[UM_OPERATOR]) - { - user->modes[UM_OPERATOR] = 1; - WriteServ(user->fd,"MODE %s :+o",user->nick); - FOREACH_MOD(I_OnOper,OnOper(user,OperType)); - log(DEFAULT,"OPER: %s!%s@%s opered as type: %s",user->nick,user->ident,user->host,OperType); - AddOper(user); - FOREACH_MOD(I_OnPostOper,OnPostOper(user,OperType)); - } + user->Oper(OperType); } else { -- cgit v1.2.3