summaryrefslogtreecommitdiff
path: root/src/cmd_oper.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 15:05:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 15:05:49 +0000
commit8d99003c221b7d6dcc04d0fc58629c243b48dbf0 (patch)
tree1412b12337da066d69cea9529dfefef7234c4062 /src/cmd_oper.cpp
parent8c4528880ab1dfe6307b03d5976e23e1a553a663 (diff)
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
Diffstat (limited to 'src/cmd_oper.cpp')
-rw-r--r--src/cmd_oper.cpp10
1 files changed, 1 insertions, 9 deletions
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
{