summaryrefslogtreecommitdiff
path: root/src/mode.cpp
AgeCommit message (Collapse)Author
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
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-10Mass-tidyup of module global vars, theyre no longer global vars.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4856 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-10Move IsNick, IsIdent into class InspIRCd, update modules that use it.brain
Change message.h to just a #warning saying its deprecated, and remove all use of it from the core :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4847 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10cmode(), cflags(), cstatus() -> chanrec::GetStatusChar(), ↵brain
chanrec::GetStatusFlags(), chanrec::GetStatus() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4837 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10FindNick, FindChan, ChanModes, UserList, CountInvisible, PurgeEmptyChannels, ↵brain
GetClass, WriteOpers, GetServerDescription -> into classes ServerConfig takes InspIRCd pointer in its constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4832 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09ServerConfig extern moved into class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WHEEEEE!!!!!brain
All of: Write(), WriteTo(), WriteFrom(), WriteServ() are now methods of userrec. Write_NoFormat(), WriteTo_NoFormat(), WriteFrom_NoFormat(), WriteServ_NoFormat() are now std::string-taking overloaded methods of the functions above All modules updated to use new syntax, my fingers hurt :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4798 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WriteChannel* functions and ChanExceptSender* functions are now methods of ↵brain
chanrec. They probably should be renamed too eventually. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4788 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-06return statement in wrong place caused modes to be droppedbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4756 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-04Allow non-ops to view listmode listsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4716 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-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-27* Fix Server::SendMode to actually work again.brain
* 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
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-10- Add notice masks display to MODE nick, using a modified version of ↵w00t
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
2006-07-10- Add usermode +n for notice masks - our implementation of snomasks. We're ↵w00t
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
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-09send_mode event for spanningtree (this will be backported to stable as its ↵brain
really a bugfix too (honest!)) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4243 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09Tweak mode parser so that oper-only modes are only enforced on local ↵brain
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
2006-07-08Fixed pointless dereference spotted by Foamybrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4198 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Implement DisplayList virtual method calls, and implement it in cmode_bbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4185 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Add usermode +o, with special checking so that an oper may only remove the ↵brain
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