diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-03 17:20:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-03 17:20:40 +0000 |
commit | 9ebbd138cc41fdd89d32b1bcbd137be4f89afa5e (patch) | |
tree | 1b607f4efa936131b7c0aeb115906567bc19b70a /src/channels.cpp | |
parent | 0b1c9c3507db83882a897038cdb5e84aded16e14 (diff) |
This probably wont compile atm - add support for prefixed messages
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3046 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index a77947126..a55fbcb88 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -176,11 +176,80 @@ void chanrec::DelUser(char* castuser) log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name); } +void chanrec::AddOppedUser(char* castuser) +{ + internal_op_userlist[castuser] = castuser; + log(DEBUG,"Added casted user to channel's internal list"); +} + +void chanrec::DelOppedUser(char* castuser) +{ + std::map<char*,char*>::iterator a = internal_op_userlist.find(castuser); + if (a != internal_op_userlist.end()) + { + log(DEBUG,"Removed casted user from channel's internal list"); + internal_op_userlist.erase(a); + return; + } + log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name); +} + +void chanrec::AddHalfoppedUser(char* castuser) +{ + internal_halfop_userlist[castuser] = castuser; + log(DEBUG,"Added casted user to channel's internal list"); +} + +void chanrec::DelHalfoppedUser(char* castuser) +{ + std::map<char*,char*>::iterator a = internal_halfop_userlist.find(castuser); + if (a != internal_halfop_userlist.end()) + { + log(DEBUG,"Removed casted user from channel's internal list"); + internal_halfop_userlist.erase(a); + return; + } + log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name); +} + +void chanrec::AddVoicedUser(char* castuser) +{ + internal_voice_userlist[castuser] = castuser; + log(DEBUG,"Added casted user to channel's internal list"); +} + +void chanrec::DelOppedUser(char* castuser) +{ + std::map<char*,char*>::iterator a = internal_voice_userlist.find(castuser); + if (a != internal_voice_userlist.end()) + { + log(DEBUG,"Removed casted user from channel's internal list"); + internal_voice_userlist.erase(a); + return; + } + log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name); +} + std::map<char*,char*> *chanrec::GetUsers() { return &internal_userlist; } +std::map<char*,char*> *chanrec::GetOppedUsers() +{ + return &internal_op_userlist; +} + +std::map<char*,char*> *chanrec::GetHalfoppedUsers() +{ + return &internal_halfop_userlist; +} + +std::map<char*,char*> *chanrec::GetVoicedUsers() +{ + return &internal_voice_userlist; +} + /* add a channel to a user, creating the record for it if needed and linking * it to the user record */ @@ -369,6 +438,7 @@ chanrec* ForceChan(chanrec* Ptr,ucrec &a,userrec* user, int created) { /* first user in is given ops */ a.uc_modes = UCMODE_OP; + Ptr->AddOppedUser((char*)user); } else { |