summaryrefslogtreecommitdiff
path: root/src/mode.cpp
AgeCommit message (Collapse)Author
2007-01-03Fix lusers breakage introduced by latest set of optimizationsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6219 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-29Add counter system for umodes to get rid of some O(n)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6163 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-23Hash rehashing changebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6080 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-22Reduce logging caused by mode changesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6060 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-18Avoid no such nick on non oper attempting to view modes of a user.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6047 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Jesus, look who's the commit whore today. More header updates, and removal ↵w00t
of namespacing. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5996 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14Refactor userrec::chans.brain
Old way: A vector of ucrec, MAXCHANS in size by default populated by NULLS, so you have to scan the vector to find an empty slot when joining a user, parting a user etc New way: std::map<chanrec*, char> (the char holds their basic core permissions on the channel [voice, halfop, op]) This increases speed a ton, and removes some wtf-age. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5986 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-03LOL INFINITE LOOPS IN IRCD ARE ROXw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5834 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-02That patch (TM) of controversy, plus a minor cleanupw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5830 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-22Disallow mode prefix # since it will mess up /whois and /privmsgpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5786 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-15Don't allow a non-oper to view another users modes. This slightly tweaks the ↵brain
rfc, because the rfc says even opers shouldnt be able to view modes but thats just a backwards pain in the neck. Also, remove the system from 1.0 whereby an oper CAN change a non-opers modes (except +o) because all this did was confuse services packages. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5748 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-12Show chanrec::age in MODE #chan, not the deprecated chanrec::createdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5717 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-28* Fix removal of user modes when unloading the mode letter (this actually ↵brain
works now) * Fix m_stripcolor channel mode +S (was unsettable as it had some user mode checks in it) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5577 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-06/me thwaps special for not reading comments :pbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5445 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-04Extra safety checking in ModeSet just to ensure we cant be passed a null pointerbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5411 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-01Add an extra debug message and change two calls of GetModeType to ↵om
GetModeChar as I'm 99.9% sure they should be git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5376 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-01It all came down to a >1 where we needed a >0. Things should be stable now jamiebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5375 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-10Take some debug crap out of ModeParser::ModeString()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5209 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-10* Fix ChanModes::ModeString to not try and set a key as a user mode ;)brain
* Tweak the way cyclehosts works, so that mode change is not echoed back to user who changes their host/ident git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5208 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09Reset LastParse string when we try to parse new modesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5188 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09Tidier string buildingbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5185 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09Make SAMODE oper output tidierbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5184 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09And fix it so it doesnt go into an infinite loop when meeting the end ↵brain
condition (oops) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5183 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09Add sane limiting to mode output, so we cant have more than 100 mode chars ↵brain
in the sequence string, or MAXMODES parameters for the modes, or a total length of params+sequence beyond 450. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5182 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-09m_override is now fixed, replaced AC_GENERAL_MODE OnAccessCheck eventbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5180 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-03Add /RELOAD and move cmd_mode into its own command.brain
/RELOAD is the only thing you cant reload (ahem) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5119 e03df62e-2008-0410-955e-edbf42e46eb7
2006-09-02Allow unloading of modules which implement modes!brain
The default implementation of the new system will remove simplemodes so any mode handler which is just a simple mode (no params and not a list mode) does not need to add much more than one line of code and remove its VF_STATIC flag. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5100 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30In this instance find is faster than rfindbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5086 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30And make it work herebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5085 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30Fix for parameters which contain a colon (which is not the first char in ↵brain
the string) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5084 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-30Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include listsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5080 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-29Only send 008 when MODE Operbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5075 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-29Clarify messagebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5074 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-29Don't silently drop modes that are oper only when a non-oper tries to set ↵brain
them - give a 481 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5073 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-29auto-set +s when +n is set (as +n requires +s) - allow +n to be 'set twice' ↵brain
allowing for snomask change without removal of +ns Add default snomask chars git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5063 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-25Add <options:cyclehosts> which allows a user to appear to have quit when ↵brain
their host changes, so that clients/bots can stay synched properly. It is recommended this option always be on. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5017 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-24When the mode sequence doesnt start with + or -, assume a +brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5009 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23ModeParser::InsertMode is no longer required -- this is auto-generated by ↵brain
the ModeParser based on what modes are registered and wether or not they have certain attributes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5007 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23Check for illegal mode prefixes in AddMode (':' and ',')brain
We should *probably* check to make sure their rank value doesnt conflict with another modules, too git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5003 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23Multi-prefix FJOIN, and allowing module-defined prefixes across the networkbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5002 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23Fix and finish 005 numeric. PREFIX= is now calculated automatically if you ↵brain
add any prefixes. You do not need to mess with the numeric yourself. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5001 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23More prefixchar stuff.brain
WARNING: 005 numeric is broken in this commit. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5000 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-23Mode handlers handling listmodes where a listmode item is a nickname can now ↵brain
specify prefixes!!!!!! This isnt documented yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4997 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-18Things are so much easier here (thanks to sts for the bug)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4963 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Just to mess with om's head, remove helperfuncs.h from everywherebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4900 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11CamelCaseRocksSoMuchICamelCasedAllTheMethodsOfClassInspIRCdSoThatItAllLooksNeat.brain
NowSomebodyHasToSpendHoursDocumentingAllOfThisIWonderWhoThatWillEndUpBeing... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4889 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Move remaining functions:brain
operstrcmp* commands.cpp InspIRCd::operstrcmp() duration* commands.cpp InspIRCd::duration() host_matches_everyone* commands.cpp InspIRCd::host_matches_everyone() ip_matches_everyone* commands.cpp InspIRCd::ip_matches_everyone() nick_matches_everyone* commands.cpp InspIRCd::nick_matches_everyone() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4888 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Change to using Instance->Log (InspIRCd::Log) rather than log() macrobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4880 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11extern time_t TIME -> InspIRCd::Time()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4873 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11commands.cpp:extern InspIRCd* ServerInstance;brain
helperfuncs.cpp: extern InspIRCd* ServerInstance; xline.cpp:extern InspIRCd* ServerInstance; The last 3 extern's in the entire program! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4866 e03df62e-2008-0410-955e-edbf42e46eb7