danieldg
96a4a1d41e
Include explicit parameter list in ProtocolInterface::SendMode
...
Also leave the strings split into deque, there's no need to pack it into a
string just to unpack it during the translate.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11181 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-07 01:29:45 +00:00
danieldg
526f5a4a02
Construct explicit parameter type list for MODE parameters
...
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because
usually, if anything in the list parsed as a nick, then it was a nick. However,
some modes like +k and +g allow free-form text, which could also resolve as a
nick. Add extra parameters to allow modes to specify their TranslateType,
defaulting to TR_TEXT.
This fixes bug #757 , found by Taros
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-06 22:28:57 +00:00
w00t
27e0df3719
Remove redundant PriorityState, enum Priority does the exact same thing.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11121 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-16 22:14:36 +00:00
peavey
f209cce90b
Nuke trailing spaces
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-14 21:14:36 +00:00
w00t
4e1ae0981e
Remove an unused event.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10989 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-23 12:58:28 +00:00
w00t
43847ec9c7
Update copyrights for 2009.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02 18:16:05 +00:00
dz
7f28ef9777
Minor documentation fix, spotted by Johannes13
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10902 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-21 13:44:01 +00:00
w00t
534870ed22
Remove numbers from these. They shouldn't be used anyway, enums are designed to prevent magic numbers abuse :).
...
Thanks Johannes13!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10895 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-15 13:58:43 +00:00
w00t
adf20f6486
Use TargetTypeFlags instead of int in a few places.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10711 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 13:14:23 +00:00
brain
a95616f608
Fix for bug #601
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10614 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-02 22:27:03 +00:00
w00t
8de87c2a9b
Change module versions to use a string instead of fixed digits, and use 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-25 20:35:51 +00:00
w00t
cb6917c48e
Add OnSendSnotice(char &, std::string &, const std::string &) to modify/block/notify about snotices being sent to users.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10221 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22 18:01:15 +00:00
w00t
48f5beea5b
Always deny invite to users below halfop status, move OnUserPreInvite up to above that access check, and allow a return of -1 to bypass the check.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10115 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-07 15:59:01 +00:00
w00t
eed401b6ec
Oops, actually, return 1 to block change, 0 to check it, -1 to allow it regardless. Update docs in header also.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10083 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-04 15:31:21 +00:00
w00t
a67b9de174
Change modes in channels and users to use std::bitset instead of an array. This saves 56 bytes per channel, and 112 bytes per channel, with no loss in speed or ease of use in code. :). Thanks (VERY) much to Special for telling me about this.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10043 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-19 20:34:14 +00:00
w00t
8ed5d452db
Okay, and there's the working version of it. Extbans that don't work on users have OnCheckStringExtBan. ;p
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9988 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-12 20:53:19 +00:00
w00t
bd2782b9e8
Add OnCheckExtBan, will be used for exceptions to extbans
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9957 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-11 21:26:27 +00:00
w00t
4e599dd4fb
Fix m_nopartmsg to work via API modification, involves a string copy that won't last too long. Compiles cleanly.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9953 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-11 14:44:17 +00:00
brain
a914ae9195
Allow changing of command string and parameter vector within OnPreCommand, 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-06-06 15:22:07 +00:00
w00t
5865b900cd
Fix logic being backwards (so every user was always away and an oper, except when they weren't an oper, and weren't away ...)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9767 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19 18:29:30 +00:00
aquanight
4b856bda13
Make User:: nick/ident/dhost/fullname and some other things std::string instead of char*/char[] (MODULES DO NOT COMPILE)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9748 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-18 23:15:53 +00:00
brain
ffbd1eebf0
Conversion of command handler params from "const char* const* parameters, int pcnt" to "const std::vector<std::string>& parameters". All of core is converted, but cant test it till the modules are converted.
...
IMPORTANT: The mode parser public calls have had to be tweaked a bit to also use the string vector. Note that this makes a LOT of our core a bit messy and paves the way to convert a lot of stuff from the mess
of .c_str() calls to using std::string params directly.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9608 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-04 21:37:36 +00:00
brain
94f2293f65
Implement our own dllmain. if this works and gets rid of error at 70 modules, i will backport it
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9521 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-16 22:17:28 +00:00
brain
3039e0663f
Change that allows the m_override module to not announce a key override for a user that specified the right key
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9516 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-16 00:36:20 +00:00
brain
548883a392
Comment small API change (returning -1 from OnCheckBan to explicitly deny the ban)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9450 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-10 20:53:13 +00:00
w00t
ce4dc653ce
Remove two useless methods, chanlog is b0rked at the moment.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9313 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-04 15:06:24 +00:00
brain
2db77cda56
Automatic detection and allocation of max fds. No longer needs recompile to change, just adjust it in your kernel or whatever and restart insp.
...
Please note that select and iocp socket engines do not support detection and are always set to FD_SETSIZE and 10240 descriptors respectively.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9263 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02 17:08:09 +00:00
w00t
e2f4bf3a13
Merge OnCancelAway and OnSetAway, add param awaymsg to OnSetAway (blank when cancelling), and change return type to int so modules can block away messages by returning nonzero.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9223 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-30 14:26:01 +00:00
brain
43d1577839
Port bindings for gnutls now bind via ip:port, rather than on all ports for that ip, fixes feature request for roadmap. NOTE, this still needs doing for the openssl module!
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9188 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-24 16:03:39 +00:00
brain
343f12b9b2
Add stuff so that modules can hook users by altering a pointer in the User class. Note that ssl modules still bind by port, but the idea of doing this change is so we can remove that logic next
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9187 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-24 15:13:17 +00:00
brain
9ee525bec5
Add WriteNumeric() to User and OnNumeric module event. Note that modules do not change the numeric text on the fly, as this involves needless allocations for numerics that arent being changed, so instead they block the original numeric and send out their own when needed.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9174 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-22 11:45:57 +00:00
brain
9855300460
Add support for OnNamesListItem, discussed with w00t a few days ago. This makes NAMESX etc a LOT cleaner and safer.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9140 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-21 15:54:15 +00:00
aquanight
da07481450
Convert remaining InspIRCd::Log() calls to new logging system
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-22 16:47:10 +00:00
brain
54b2b600de
More test suite stuff
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8976 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-21 15:59:57 +00:00
brain
dd36852a52
Wheee, mass commit! this adds const stafety, throwing a compile error if 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-20 19:07:07 +00:00
brain
32a26fa539
Someone please help me fix the warnings in modules caused by this change. 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
2008-02-18 16:55:27 +00:00
brain
60aefe2290
Make AC_OTHERMODE OnAccessCheck call work again.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8942 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-14 19:32:48 +00:00
brain
bfaf7e3b27
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy trigger-happy gcc4 (thanks)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-13 18:22:19 +00:00
aquanight
18154f4d22
Support for /invite <user> <channel> <timeout> - if the user doesn't partake in <timeout> time, the invite expires
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8854 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-08 23:35:39 +00:00
aquanight
d555db40f4
Make m_password_hash able to pick up hasher modules after it's loaded, meaning m_md5 and m_sha256 no longer have to be loaded before it.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8793 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-02 22:14:24 +00:00
aquanight
20bea3078d
Change API OnOperCompare to OnPassCompare, password hashing is now available for <connect:allow>, <power die= restart=>, <title> (m_customtitle.so), <vhost> (m_vhost.so), this works the same was as for <oper>: load m_password_hash.so (after all hasher modules, of course), and add hash="md5/sha256/whatever" to the relevant tag. Also fix m_callerid.cpp crashing on unload.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8755 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-27 00:12:11 +00:00
w00t
e4acbc95b8
Header update: 2007 -> 2008
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10 13:27:07 +00:00
w00t
6f84254ed6
Add OnExpireLine(XLine *) hook, will be used in xline db stuff to avoid getting a fucked up vector
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8676 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-09 12:20:21 +00:00
w00t
38cc4dda4d
Hopefully correct implementation of OnRawMode.. can someone pls check this for me tomorrow.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8654 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-06 21:25:38 +00:00
w00t
413074b771
OnRawMode event makes a return: This was removed post 1.0 because it was incredibly slow with the previous hooking mechanism. It should be okay now that module hooks aren't O(n).. Just the header and virtual atm, no implementation in the parser.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8653 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-06 21:04:56 +00:00
w00t
e7f33ba189
Permanent channels, currently conflicts with blockcaps (+P) and is untested
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8650 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-06 14:43:42 +00:00
w00t
f5c3e3782b
Add param 'opername' to event OnPostOper. This will help make a (slightly nicer) version of dz's patch to allow modes in <oper>
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8615 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-02 22:58:47 +00:00
brain
6408757295
More stuff incoming
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8575 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11 19:24:30 +00:00
brain
621f93b72f
More stuff
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8574 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11 19:21:19 +00:00
brain
5e1f2c1728
In prep for remote includes, configuration reading is now two-pass.
...
Note that theres an important part missing from here, there can be a NON-BLOCKING delay between the start of pass 2 and the files being available for download.
At this point, ServerConfig::Read() should probably return an ENOTREADY or such at which point it gets monitored for ready state. The socket engine is ready at this point
so we can poll the socket engine for it. In the case of startup, the socket engine blocks in a private loop, its no good booting the ircd till we have a complete config!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8565 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11 17:01:00 +00:00