summaryrefslogtreecommitdiff
path: root/include/mode.h
AgeCommit message (Collapse)Author
2006-08-11(Bigger than it looks, i did this with perl inplace edit) -- commands now ↵brain
take an InspIRCd* param to their constructor, so that you can do stuff within them without an extern git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4862 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10So much stuff changed in this one, i forgot most of it.brain
Oh yeah, main thing is ModeHandler and ModeWatcher classes now take an InspIRCd* to their constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4858 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move InsertMode into ModeParserbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4849 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03Dynamically generate 004 numeric from the modehandler listbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4665 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28Add support for syntax of commands in place of the text 'Not enough ↵brain
parameters' in numeric 461, where supported. To support this each derived class of command_t must set the value of command_t::syntax to a non-empty string. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4561 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-27Change std::pair<bool,std::string> to neater typedef "ModePair"brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4557 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-27Mode merging during FJOIN with ourts==theirts. Only +k and +l have ↵brain
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
2006-07-27commit remainder of new mode bouncing stuff for TS based modesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4550 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-26Add extra method to mode handler, ModeHandler::ModeSet().brain
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
2006-07-16mass tidyup, change A LOT of stuff to const char** which was char** (such as ↵brain
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
2006-07-10Inherit tons of stuff from classbase that should always have beenbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4298 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10Made a load more stuff Extensible which might be of use to someonebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4293 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10Added ModeParser::AddModeWatcher() and ModeParser::DelModeWatcher()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4266 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09Finally finished documenting new mode parser. Lots of comments.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4242 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Convert u_listmode and m_banexception to new apibrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4189 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Added DisplayCurrentModes which will display the modes of a channel or nickbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4181 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Refactored user modes to work like the channel modes - core and module data ↵brain
now the same storage format without ::modebits git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4175 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Added usermodes +swi.brain
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
2006-07-08Add cmode +o (op/deop) and in the process change a lot of char* to const ↵brain
char* to avoid unneccessary casts git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4165 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08ModeHandler documentedbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4161 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Started work on ModeParser::CleanMask()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4145 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Commentsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4144 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Mode +b stuff, probably wont work yetbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4133 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Aaaand, correct all the obligitary typosbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4129 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Added masking stuff.brain
Basically, so that we can hold user modes and channel modes in the same list, we use bitwise masking. We have a list of handlers, 256 in size 0 through 255, and to work out where a mode handler is dependent on WHAT it is, we use this simple hashing algorithm (no collisions can occur): (modeletter - 65) | mask Where mask is 128 (10000000b) if its a user mode, or 0 (00000000b, duh) if its a channel mode. Smart, and much faster than using a map of pairs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4128 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Mode parser WORKS! (for simple non-parameterized channel modes)brain
Tested with channel mode +s. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4126 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07Header for cmode_s.cppbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4124 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-10Typedef an ugly iterator, dont send mode string if no modes were in the ↵brain
output sequence git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3867 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-10More fixesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3863 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-10Extra allowance for modes which have different number of params when being ↵brain
set to being unset (read as: jro smoking craq) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3858 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-10Start of new mode parserbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3857 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-09Om's way is better and lets watchers change mode parameters for the modes ↵brain
theyre watching git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3856 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-09Start of mode parser refactoringbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3855 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-02Undo me screwing stuff upom
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3797 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-02Add amd64/linux to list of OS'es tested, but mainly CIA test :Pom
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3796 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09UM_WALLOPS had value 3 which was a combination of UM_SERVERNOTICE and ↵brain
UM_INVISIBLE :/ git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3591 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Added userrec::modebits - fast way of checking if user has +swi rather than ↵brain
an icky strchr git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3588 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-06Tidied up give/take methodsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3482 e03df62e-2008-0410-955e-edbf42e46eb7
2006-01-15Updated copyrights in headers etc using perl inplace editbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2795 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-16Split all commands into seperate files and redid command system to take ↵brain
classes, not function pointers (function pointers suck ass) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2534 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-16GROK!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2521 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-16Moved mode stuff into modeparserbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2520 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-14Tidied up inspircd.hbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2421 e03df62e-2008-0410-955e-edbf42e46eb7
2004-05-28Test change to verify security settings on brainbox allow me to commit to cvsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@831 e03df62e-2008-0410-955e-edbf42e46eb7
2004-05-16Updated header commentsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@816 e03df62e-2008-0410-955e-edbf42e46eb7
2004-04-26Fixed bug #15 - mode case sensitivity issue in mirc (glitch reported by ↵brain
strike and mentality) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@740 e03df62e-2008-0410-955e-edbf42e46eb7
2004-04-19added mode.h/mode.cpp and seperated mode functions into itbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@666 e03df62e-2008-0410-955e-edbf42e46eb7