summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
AgeCommit message (Collapse)Author
2008-09-07Don't execute multiple aliases after executing one.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10445 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-07Fix aliases returning multiple messages, thanks Ankit.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10444 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-07Fix compile. Try again, Ankit.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10443 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-07Set default values for <alias:usercommand> and <alias:channelcommand>, ↵w00t
Ankit, please provide feedback. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10439 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-06Add (currently untested and undocumented) fantasy command ↵w00t
(<alias:channelcommand>) support. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10425 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-06Rename some member fields; add <alias:usercommand>, default true - whether ↵w00t
or not the alias may be used as a /command. Also add (but don't yet implement) <alias:channelcommand>, default false, as to whether or not the command may be used as a fantasy command. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10423 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-06Restructuring to m_alias, this will be used for (optional) fantasy commands.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10422 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-06Modify aliases to use a multimap rather than a vector for storage + a map ↵w00t
for quick existance checking, this makes processing an alias that exists O(log n), while keeping checking for nonexistant aliases O(log n) also, as well as saving us a few bytes of memory. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10419 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-28Fix aliases stuff.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10338 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Change module versions to use a string instead of fixed digits, and use ↵w00t
propset ID to auto-set versions, so we don't have (essentially unused) module versions. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10291 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Match conversion stuff.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10216 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Revert automated conversion by Special, as it (unfortunately) neglects some ↵w00t
details. It provides a useful start point, though, so it'll be used as the basis for the final conversion. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10215 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Fix a lot of calls to match() and uses of wildcard.h (which doesn't exist ↵special
anymore) after w00t broke them. Still broken pending a few more changes (it's all w00t's fault.) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10214 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-11fixed some indentation and spacing in modulespippijn
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9888 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-06Allow changing of command string and parameter vector within OnPreCommand, ↵brain
allowing for m_abbreviation and other fancy stuff. Add basic skeleton module for it git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9840 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-18Please see my XXX in m_conn_umodes w00t, maybe something we can look at next?brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9735 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-06Fix broken m_alias, cant preallocate and then push_back, because then its ↵brain
maxparams + size :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9658 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04Ok 3rd time lucky, thanks for the pointers Brainpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9615 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04fix thispeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9614 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04First attempt at converting to new command handler, please review diff Brain.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9613 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-24And more of thembrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9186 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-22Wheeee for HUGE commits. Convert all numerics to WriteNumeric so that ↵brain
OnNumeric can capture them. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9175 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-20Wheee, mass commit! this adds const stafety, throwing a compile error if ↵brain
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
2008-02-11Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a ↵w00t
note to webirc that needs looking at. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-17Fix.. snomask O is already taken (ffs) so use A insteadw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8729 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-17Remove InspIRCd::WriteOpers in favour of snomask Ow00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8728 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10Header update: 2007 -> 2008w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04Convert all to new Attach() system. The Implements() method needs removing ↵brain
from all modules as it is dead weight. WARNING: there are segfaults here! HERE BE DRAGONS, i am not finished! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8510 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-04Next part of Development/Hooking (see wiki)brain
Module::Prioritize and Module::Implements are now GONE. ModuleManager::MoveTo, MoveBefore, MoveAfter, MoveFirst, MoveLast are GONE too. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8498 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15In the grand tradition of huge fucking commits:w00t
- chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27Remove unnecessary header trafficw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7885 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Add some stuff to change how we process a token sepeperated streambrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7800 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-24Replace some voodoo with a definew00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7556 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵peavey
auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-03Removed superfluous semicolonspippijn
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7423 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-17Module factory and init function in modules turned into a neat macro:brain
INIT_MODULE(MyModuleClassName); Get cracking, w00t :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7341 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-09A ton more clear() and empty() stuff thats been lingering on the long term ↵brain
todo for too long a term :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7264 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-21Header rearrangement, move inspircd.h to top, remove stdio, stdlib, ↵brain
stdblahblah that we dont even use, remove redeclared <string>, <map>, <vector>. This (1) fixes the irc::string::move warnings on vc8 (2) speeds up compile a lot git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7098 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-19Windows support. Tested and working to compile on freebsd and linux. Next ↵w00t
step is to make sure it actually works in windows too. ;p. Add Burlex to contributors. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7043 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-12The commit that should have been r7000: src/modules now uses IS_OPER instead ↵w00t
of not so tidy char equivilant git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7001 e03df62e-2008-0410-955e-edbf42e46eb7
2007-04-02This needs some general QA-ing. Add support to new parser (introduced in ↵brain
1.1) for empty final params (just the colon) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6731 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-17Mass comment removal.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6367 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-14Add alias:matchcase config setting (per-alias, determines wether to match ↵brain
case on format string) and ability for case sensitive match() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6319 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-14Allow aliasing of anything to anything, removing the need for tons of ↵brain
non-programmer tweaks to be modules. Also speed up matching of aliases by storing a map so we dont need to loop if we dont have an alias that looks like the current command (when allowing aliasing of ANYTHING this is required otherwise this module would be major cpu suck) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6317 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-01Fix to allow for OnRehash to know what user initiated the rehashbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6207 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-22Fix for alias var names within aliasesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6059 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-16Add format="" value, at request of Emeric.brain
See: http://www.inspircd.org/forum/index.php/topic,245.0.html git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6019 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-16Allow linefeeds in this module in one valuebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6016 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-16Linefeeds in quotes, just for w00t.brain
WARNING: THIS NEEDS SOME EXTRA STUFF TOMORROW: Someone remind me to add a 'no linefeeds' bool flag to ConfigReader::ReadValue, because a lot of values should NOT have linefeeds in! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6004 e03df62e-2008-0410-955e-edbf42e46eb7