summaryrefslogtreecommitdiff
path: root/src/mode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change std::pair<bool,std::string> to neater typedef "ModePair"Gravatar brain2006-07-271-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4557 e03df62e-2008-0410-955e-edbf42e46eb7
* Mode merging during FJOIN with ourts==theirts. Only +k and +l have ↵Gravatar brain2006-07-271-2/+2
| | | | | | CheckTimestamp methods atm, needs to be finished by me and TIDIED. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4556 e03df62e-2008-0410-955e-edbf42e46eb7
* * Fix Server::SendMode to actually work again.Gravatar brain2006-07-271-1/+1
| | | | | | | * In the 1.1 protocol we now use FMODE for everything, rather than MODE. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4551 e03df62e-2008-0410-955e-edbf42e46eb7
* commit remainder of new mode bouncing stuff for TS based modesGravatar brain2006-07-271-0/+14
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4550 e03df62e-2008-0410-955e-edbf42e46eb7
* Add extra method to mode handler, ModeHandler::ModeSet().Gravatar brain2006-07-261-0/+12
| | | | | | | | | | | Returns a std::pair<bool,string>. if the bool is true, the mode is set, and the second item in the pair is the parameter set on it, if any If the bool is false, the mode is not set, and the parameter given is returned as the second item of the pair To be used in mode bouncing, to build a safe set of bounced modes (dont ask yet) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4549 e03df62e-2008-0410-955e-edbf42e46eb7
* mass tidyup, change A LOT of stuff to const char** which was char** (such as ↵Gravatar brain2006-07-161-3/+3
| | | | | | | | | | parameters to commands in handlers) which makes the new lineparser work neater with no casts. This also removes tons of casts from other locations (all in all, ive added 2 casts and removed almost a hundred) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4403 e03df62e-2008-0410-955e-edbf42e46eb7
* - Add notice masks display to MODE nick, using a modified version of ↵Gravatar w00t2006-07-101-0/+2
| | | | | | Unreal's 008 (no stupid formatting, display it like 221) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4275 e03df62e-2008-0410-955e-edbf42e46eb7
* - Add usermode +n for notice masks - our implementation of snomasks. We're ↵Gravatar w00t2006-07-101-2/+3
| | | | | | not sure how this will tie in with +s yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4274 e03df62e-2008-0410-955e-edbf42e46eb7
* Added ModeParser::AddModeWatcher() and ModeParser::DelModeWatcher()Gravatar brain2006-07-101-3/+48
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4266 e03df62e-2008-0410-955e-edbf42e46eb7
* send_mode event for spanningtree (this will be backported to stable as its ↵Gravatar brain2006-07-091-4/+0
| | | | | | really a bugfix too (honest!)) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4243 e03df62e-2008-0410-955e-edbf42e46eb7
* Tweak mode parser so that oper-only modes are only enforced on local ↵Gravatar brain2006-07-091-1/+1
| | | | | | clients, so that during a burst the remote server can set them and we dont get desyncs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4212 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixed pointless dereference spotted by FoamyGravatar brain2006-07-081-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4198 e03df62e-2008-0410-955e-edbf42e46eb7
* Implement DisplayList virtual method calls, and implement it in cmode_bGravatar brain2006-07-081-1/+20
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4185 e03df62e-2008-0410-955e-edbf42e46eb7
* Add usermode +o, with special checking so that an oper may only remove the ↵Gravatar brain2006-07-081-0/+9
| | | | | | | | | mode not set it (on himself or others) - Finish off facility for oper-only user and channel modes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4183 e03df62e-2008-0410-955e-edbf42e46eb7
* Forgot return;sGravatar brain2006-07-081-0/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4182 e03df62e-2008-0410-955e-edbf42e46eb7
* Added DisplayCurrentModes which will display the modes of a channel or nickGravatar brain2006-07-081-4/+24
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4181 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix typosGravatar brain2006-07-081-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4180 e03df62e-2008-0410-955e-edbf42e46eb7
* Add code to display umode changes when they occurGravatar brain2006-07-081-0/+9
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4179 e03df62e-2008-0410-955e-edbf42e46eb7
* Added usermodes +swi.Gravatar brain2006-07-081-0/+16
| | | | | | | | | Note the usermode system needs a bit of a refactor to combine module and core modes into the same storage neatly (as we did with channels) this is next on my todo. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4174 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove comemnted-out GiveVoice and TakeVoiceGravatar brain2006-07-081-57/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4173 e03df62e-2008-0410-955e-edbf42e46eb7
* Add cmode +v - that's all the RFC channel modes done nowGravatar brain2006-07-081-4/+7
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4172 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove the TakeHops and GiveHops from commentsGravatar brain2006-07-081-57/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4171 e03df62e-2008-0410-955e-edbf42e46eb7
* Add support for cmode +hGravatar brain2006-07-081-0/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4170 e03df62e-2008-0410-955e-edbf42e46eb7
* Tidyup, and add numeric 472 "unknown mode char"Gravatar brain2006-07-081-22/+8
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4169 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix for permissions :pGravatar brain2006-07-081-7/+14
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4168 e03df62e-2008-0410-955e-edbf42e46eb7
* Put back security checks so non-ops cant set modes again :pGravatar brain2006-07-081-0/+14
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4167 e03df62e-2008-0410-955e-edbf42e46eb7
* Integrate +o into handlersGravatar brain2006-07-081-2/+12
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4166 e03df62e-2008-0410-955e-edbf42e46eb7
* Add cmode +o (op/deop) and in the process change a lot of char* to const ↵Gravatar brain2006-07-081-82/+28
| | | | | | char* to avoid unneccessary casts git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4165 e03df62e-2008-0410-955e-edbf42e46eb7
* Add channelmode +lGravatar brain2006-07-081-1/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4163 e03df62e-2008-0410-955e-edbf42e46eb7
* Add chmode +k, cut down includes in use in mode.cppGravatar brain2006-07-081-14/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4162 e03df62e-2008-0410-955e-edbf42e46eb7
* CommentsGravatar brain2006-07-081-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4160 e03df62e-2008-0410-955e-edbf42e46eb7
* Add support for channelmode +iGravatar brain2006-07-071-0/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4159 e03df62e-2008-0410-955e-edbf42e46eb7
* Add cmode_n and cmode_tGravatar brain2006-07-071-0/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4158 e03df62e-2008-0410-955e-edbf42e46eb7
* Save ourselves 3 dereferencesGravatar brain2006-07-071-6/+8
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4155 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove the transposition of @ and ! stuff, doesnt work right and not a good ↵Gravatar brain2006-07-071-10/+10
| | | | | | | | | | | enough idea to be worth fixing Fix mode parser so that if a handler nukes its parameter to an empty string, but its said it MUST have a parameter (e.g. +b or +L) then thats equivalent to MODEACTION_DENY as we cant do anything without the param. The whole mode and its parameter get 'eaten' and the next character is moved to instead. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4151 e03df62e-2008-0410-955e-edbf42e46eb7
* Avoid throwing a std::out_of_range exception when given a ban without ! or @ ↵Gravatar brain2006-07-071-1/+1
| | | | | | in it (whooops) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4150 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix to check for colon (accidentally typed pos_of_dot)Gravatar brain2006-07-071-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4148 e03df62e-2008-0410-955e-edbf42e46eb7
* Mask cleaning.Gravatar brain2006-07-071-0/+37
| | | | | | | | | | | | nick -> nick!*@* nick!ident -> nick!ident@* host.name -> *!*@host.name ident@host.name -> *!ident@host.name transposed @ and !, swap @ and ! to form proper n!u@h ordering Hostname determined by containing a dot or a colon git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4147 e03df62e-2008-0410-955e-edbf42e46eb7
* Started work on ModeParser::CleanMask()Gravatar brain2006-07-071-0/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4145 e03df62e-2008-0410-955e-edbf42e46eb7
* A bit more debuggingGravatar brain2006-07-071-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4143 e03df62e-2008-0410-955e-edbf42e46eb7
* 'Activate' +m by putting it in the constructorGravatar brain2006-07-071-1/+8
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4142 e03df62e-2008-0410-955e-edbf42e46eb7
* GCC defines and <hash_map> -> "hash_map.h"Gravatar brain2006-07-071-5/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4138 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix listmodes and modes with paramsGravatar brain2006-07-071-3/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4136 e03df62e-2008-0410-955e-edbf42e46eb7
* Add mode +b to active listGravatar brain2006-07-071-0/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4135 e03df62e-2008-0410-955e-edbf42e46eb7
* fix channel mode +bGravatar brain2006-07-071-7/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4134 e03df62e-2008-0410-955e-edbf42e46eb7
* Mode +b stuff, probably wont work yetGravatar brain2006-07-071-96/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4133 e03df62e-2008-0410-955e-edbf42e46eb7
* Tidied up checking in ModeParser::AddMode() and added a humorous comment ↵Gravatar brain2006-07-071-1/+16
| | | | | | about modes like '^' and '_'. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4132 e03df62e-2008-0410-955e-edbf42e46eb7
* Initialize mode handlers and watchers to 0 in the constructor, or mucho pain ↵Gravatar brain2006-07-071-0/+4
| | | | | | can ensue git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4130 e03df62e-2008-0410-955e-edbf42e46eb7
* Aaaand, correct all the obligitary typosGravatar brain2006-07-071-2/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4129 e03df62e-2008-0410-955e-edbf42e46eb7
* Added hashing stuff to hold both user and channel modes in the ↵Gravatar brain2006-07-071-5/+22
| | | | | | watcher/handler list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4127 e03df62e-2008-0410-955e-edbf42e46eb7