summaryrefslogtreecommitdiff
path: root/src/mode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a cosmetic issue: 'oper type does not have access'Gravatar w00t2008-04-051-6/+17
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9359 e03df62e-2008-0410-955e-edbf42e46eb7
* The start of extended bans infrastructure: syntax is e.g. +b n:w00tdiff@*, ↵Gravatar w00t2008-04-041-3/+3
| | | | | | bans of any type can be applied and checked against, but there's more to come with this. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9337 e03df62e-2008-0410-955e-edbf42e46eb7
* Fixes for bug #493, tidyups to clearing of channel modes on losing FJOIN. ↵Gravatar brain2008-04-021-6/+23
| | | | | | Module unloads may also be tidied at a future date but it means reordering some loops in mode.cpp. See around the comment added. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9283 e03df62e-2008-0410-955e-edbf42e46eb7
* Add an optional bool to ModeParser::ModeString() to not give the nickname n ↵Gravatar brain2008-04-011-4/+10
| | | | | | times on the end of the string. This can be used for w00ts funky stuff. :-) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9242 e03df62e-2008-0410-955e-edbf42e46eb7
* Add ability to control what opertypes can set what operonly user/chan modes. ↵Gravatar aquanight2008-03-231-3/+6
| | | | | | This works the same way as commands, in that modes allowed by classes are added together, and * allows all. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9176 e03df62e-2008-0410-955e-edbf42e46eb7
* Wheeee for HUGE commits. Convert all numerics to WriteNumeric so that ↵Gravatar brain2008-03-221-13/+13
| | | | | | OnNumeric can capture them. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9175 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix for bug #466 reported by JohnGravatar brain2008-02-261-2/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9042 e03df62e-2008-0410-955e-edbf42e46eb7
* Convert remaining InspIRCd::Log() calls to new logging systemGravatar aquanight2008-02-221-3/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
* Wheee, mass commit! this adds const stafety, throwing a compile error if ↵Gravatar brain2008-02-201-1/+1
| | | | | | | | | anyone does: "parameters[n] = blahvar;" in a command handler etc. where they REALLY SHOULD NOT fuck with the value and should copy the pointer. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8971 e03df62e-2008-0410-955e-edbf42e46eb7
* Someone please help me fix the warnings in modules caused by this change. ↵Gravatar brain2008-02-181-8/+8
| | | | | | All mode handler OnMode events, ModeWatcher::BeforeMode/AfterMode, plus OnRawMode now have a bool servermode parameter git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8964 e03df62e-2008-0410-955e-edbf42e46eb7
* Change string for Om <3Gravatar brain2008-02-141-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8943 e03df62e-2008-0410-955e-edbf42e46eb7
* Make AC_OTHERMODE OnAccessCheck call work again.Gravatar brain2008-02-141-1/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8942 e03df62e-2008-0410-955e-edbf42e46eb7
* If the mode defined by the handler is not '\0', but the handler for itGravatar brain2008-02-141-17/+23
| | | | | | | | | cannot be found, they probably dont have the right module loaded to implement the prefix they want to compare the mode against, e.g. '&' for m_chanprotect. Revert to checking against the minimum core prefix, '%'. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8941 e03df62e-2008-0410-955e-edbf42e46eb7
* Reword the failure message to read a little betterGravatar brain2008-02-141-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8940 e03df62e-2008-0410-955e-edbf42e46eb7
* Duh, wasnt working when the user had NO prefixes at all!Gravatar brain2008-02-141-10/+9
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8939 e03df62e-2008-0410-955e-edbf42e46eb7
* That was REALLY dumb. Due to a stupid kludge i did, there was duplicate code ↵Gravatar brain2008-02-141-61/+46
| | | | | | and the new permissions stuff was only working against modes with params! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8938 e03df62e-2008-0410-955e-edbf42e46eb7
* All working now, with any luckGravatar brain2008-02-141-16/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8936 e03df62e-2008-0410-955e-edbf42e46eb7
* New mode stuff. Note, the framework is now here so that every mode handler ↵Gravatar brain2008-02-141-18/+51
| | | | | | | | | | can state what prefix is required to execute it. For example: You can say that mode +j needs '%' to execute it, so that then only a halfop or above can use mode +j. If you put '@' in this member value, only ops and above can use it. The OnRawMode can return ACR_ALLOW on a case by case basis to totally override this check against the prefix char. If you return ACR_DEFAULT the check goes ahead. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8935 e03df62e-2008-0410-955e-edbf42e46eb7
* More OnRawMode fixGravatar w00t2008-02-141-9/+9
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8932 e03df62e-2008-0410-955e-edbf42e46eb7
* Hopefully fix behaviour of OnRawModeGravatar w00t2008-02-141-2/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8931 e03df62e-2008-0410-955e-edbf42e46eb7
* More to quiet down. This will be a really tidy looking build for most users nowGravatar brain2008-02-101-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8880 e03df62e-2008-0410-955e-edbf42e46eb7
* Move some stuff to usermanager, remove a little header insanity, remove ↵Gravatar w00t2008-02-021-1/+1
| | | | | | trace because it's still less useful than a chocolate fireman. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8790 e03df62e-2008-0410-955e-edbf42e46eb7
* Header update: 2007 -> 2008Gravatar w00t2008-01-101-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
* Hopefully correct implementation of OnRawMode.. can someone pls check this ↵Gravatar w00t2008-01-061-0/+15
| | | | | | for me tomorrow. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8654 e03df62e-2008-0410-955e-edbf42e46eb7
* Partial fix for bug #441Gravatar brain2007-11-031-1/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8479 e03df62e-2008-0410-955e-edbf42e46eb7
* pedantic safeGravatar brain2007-10-231-35/+30
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8316 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove the need for a bunch of the hard coded arrays/hashes by scanning the ↵Gravatar brain2007-10-221-0/+5
| | | | | | src/ dir for tag comments, like in modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8307 e03df62e-2008-0410-955e-edbf42e46eb7
* In the grand tradition of huge fucking commits:Gravatar w00t2007-10-151-19/+19
| | | | | | | | - chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
* Support 501 numeric (its different for user modes compared to channel modes) ↵Gravatar brain2007-10-071-1/+1
| | | | | | - thanks anmaster git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8134 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove some fake client stuff, make it use the global recordGravatar w00t2007-08-281-7/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7941 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove more unnecessary header trafficGravatar w00t2007-08-271-3/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7887 e03df62e-2008-0410-955e-edbf42e46eb7
* Proper fix for end-of-list numerics on restricted lists in bug #386, rather ↵Gravatar brain2007-08-261-0/+5
| | | | | | than a hackish nonmodular one. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7838 e03df62e-2008-0410-955e-edbf42e46eb7
* Ive tidied up the mode count stuff, but i still cant duplicate negative ↵Gravatar brain2007-07-181-0/+3
| | | | | | invisible counts. :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7474 e03df62e-2008-0410-955e-edbf42e46eb7
* OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.Gravatar peavey2007-07-161-1/+1066
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
* 'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵Gravatar peavey2007-07-161-1066/+1
| | | | | | auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
* Explicitly disallow mode prefixes > 126, to prevent excess muppetry by 3rd ↵Gravatar brain2007-07-131-1/+1
| | | | | | party module devs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7438 e03df62e-2008-0410-955e-edbf42e46eb7
* Compile fixesGravatar brain2007-07-011-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7417 e03df62e-2008-0410-955e-edbf42e46eb7
* Optimizations and code tidyups. QA please check that svsnick and other ↵Gravatar brain2007-07-011-2/+2
| | | | | | forced nick changes still work right after this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7416 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix advertising of +h/% in 005 and 004 numerics when halfops are not enabled ↵Gravatar brain2007-06-121-0/+12
| | | | | | in the conf, spotted by Smartys, fixes bug #322 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7282 e03df62e-2008-0410-955e-edbf42e46eb7
* Change some = "" to clear() and some == "" to .empty()Gravatar brain2007-06-091-6/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7263 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix bug #310 reported by Smartys, and optimize mode.cpp a bit (was using ↵Gravatar brain2007-05-301-4/+4
| | | | | | string comparison to identify an empty string, e.g. somestr == "", when we can use the much faster somestr.empty()) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7191 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix std::sort stuff for w00tGravatar brain2007-05-191-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7050 e03df62e-2008-0410-955e-edbf42e46eb7
* We've had an IS_OPER macro for a long time. About time we started using it, ↵Gravatar w00t2007-05-121-3/+3
| | | | | | maybe? :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6990 e03df62e-2008-0410-955e-edbf42e46eb7
* foolish human! you can't /mode query a user that isnt there!Gravatar brain2007-05-041-0/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6871 e03df62e-2008-0410-955e-edbf42e46eb7
* Where others charge, we give for free. Have fun and use wisely. With great ↵Gravatar brain2007-05-041-1/+18
| | | | | | power comes great responsbility. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6867 e03df62e-2008-0410-955e-edbf42e46eb7
* Move new listmode check deeper into the mode parser so that it doesnt ↵Gravatar brain2007-05-011-8/+10
| | | | | | generate spurious craq (thanks HiroP_) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6853 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix one issue, add another feature: When sending MODE +beI, weed out ↵Gravatar brain2007-04-301-1/+17
| | | | | | | | | | duplicates with simple O(1) check so that users dont send MODE #chan +bbbbbbbbbbbb. Allow configuration of which listmodes you want to deny to below halfops. For example <options hidemodes="eI">. This is because blocking +b can break mirc, blocking +eI usually wont break it so severely. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6852 e03df62e-2008-0410-955e-edbf42e46eb7
* Add support for hiding listmode lists such as +beI from unprivileged users.Gravatar brain2007-04-271-0/+6
| | | | | | | See bug #258 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6849 e03df62e-2008-0410-955e-edbf42e46eb7
* Change the constructor of ModeParser, make it just a tiny bit prettier.Gravatar brain2007-02-091-25/+29
| | | | | | | Rather than calling AddMode like 25 times, put them in a nice looking array and call it in a loop, doesnt look as craqy (although its exactly the same thing with makeup on) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6555 e03df62e-2008-0410-955e-edbf42e46eb7
* Better way even than suggested.Gravatar brain2007-01-201-0/+7
| | | | | | | | We need one counter, nonlistmodes_found, and start with it at 0. In the while loop, if we find any modes that arent of list mode type we inc the counter, and if the counter is zero after the end of the loop, we can just return (we processed everything already and nothing is left) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6401 e03df62e-2008-0410-955e-edbf42e46eb7