brain
09b79e31b4
Add empty snomasks.cpp (still got to add headers here so the build doesnt barf on the empty file?)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4270 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10 14:32:50 +00:00
brain
e2ca8e6131
Add interface to AddModeWatcher and DelModeWatcher into class Server
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4267 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10 12:53:29 +00:00
brain
db75baa96d
Added ModeParser::AddModeWatcher() and ModeParser::DelModeWatcher()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4266 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10 12:46:03 +00:00
brain
b4cbd36f1c
Finally finished documenting new mode parser. Lots of comments.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4242 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 19:22:04 +00:00
brain
de4a3f44b9
Fix whoopsies
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4239 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 17:59:42 +00:00
brain
04b29a4e89
Added Server::GetModuleName(), Module* to filename
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4238 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 17:56:43 +00:00
brain
b98c8c198c
Reorder to avoid warning.
...
We could make the autotidy stuff part of the 'check argument' virtual method in banexception and inviteexception at a later date?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4237 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 17:37:36 +00:00
brain
f16ef27e0e
Altered u_listmode to have a constructor arg 'autotidy' which if set to true runs input through ModeParser::CleanMask() otherwise leaves it alone
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4236 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 17:36:30 +00:00
brain
49ef1162a5
Alter SetModeParam to take const char* to save on casts, notice a load of modules that arent setting the param or the mode inside the handler
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4231 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 16:40:58 +00:00
om
a09109f612
Okay..updates to u_listmode, general cleanups and add some virtual methods which subclasses can override to alter behaviour..all looking much nicer and more flexible now.
...
Update m_chanfilter to use u_listmode, demonstrates most or all of the new features of it and looks a hell of a lot prettier :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4201 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 11:59:07 +00:00
om
ceebdc9437
Add a parameter to set what config tag to parse (defaults to what was previously hardcoded); Some other cleanups using initialisation lists, and using a ConfigParser stack-allocated rather than keeping a persistent heap-allocated one; Remove hardcoded filename prefixes in log messages
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4200 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-09 11:07:21 +00:00
brain
f6fc729c72
Did some renaming so that the methods for modes in chanrec and userrec are identical.
...
bool IsModeSet(const unsigned char c);
void SetMode(const unsigned char c, bool value);
Fixed m_botmode for new api
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4194 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 21:37:16 +00:00
brain
5e5162341d
Port m_blockcaps to new api, remove OnExtendedMode and OnDisplayList events entirely
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4191 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 21:12:22 +00:00
brain
793d2364d9
Convert u_listmode and m_banexception to new api
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4189 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 20:57:24 +00:00
brain
f88beda4d4
Remove Server::AddExtendedMode and Server::AddExtendedListMode, replace with Server::AddMode (makes more sense naming wise too as all modes are modes, all the same now)
...
NOTE: Modules that implement modes WILL NO LONGER COMPILE NOW UNTIL THEY ARE PORTED TO THE NEW API
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4188 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 20:14:57 +00:00
brain
4fa01bc07b
Implement DisplayList virtual method calls, and implement it in cmode_b
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4185 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 19:46:55 +00:00
brain
9fb4cb8d33
Add usermode +o, with special checking so that an oper may only remove the 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
2006-07-08 18:37:01 +00:00
brain
5bbea4813d
Added DisplayCurrentModes which will display the modes of a channel or nick
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4181 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 18:22:34 +00:00
brain
fc9e00f492
Add userrec::HasMode, fix some typos.
...
TODO: Make more use of userrec::HasUmode('c') rather than user->modes['c'-65] *oogly*
Next - get umode +o working!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4178 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 18:03:30 +00:00
brain
1d3147a96e
Change channelmodes -> usermodes (typo)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4177 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 17:53:37 +00:00
brain
3f389a4bd9
Convert new +isw modes to new mode format
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4176 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 17:53:03 +00:00
brain
33ed72a1df
Refactored user modes to work like the channel modes - core and module data now the same storage format without ::modebits
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4175 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 17:44:16 +00:00
brain
d40e1e5b0b
Added usermodes +swi.
...
Note the usermode system needs a bit of a refactor to combine
module and core modes into the same storage neatly (as we did
with channels) this is next on my todo.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4174 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 17:04:18 +00:00
brain
56917208cd
Add cmode +v - that's all the RFC channel modes done now
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4172 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 16:46:05 +00:00
brain
2d4621658d
Add support for cmode +h
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4170 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 16:10:34 +00:00
brain
2f32d64790
Add cmode +o (op/deop) and in the process change a lot of char* to const char* to avoid unneccessary casts
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4165 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 15:05:33 +00:00
brain
4260fd6227
Add channelmode +l
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4163 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 14:20:25 +00:00
brain
abe417a809
Add chmode +k, cut down includes in use in mode.cpp
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4162 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 14:03:05 +00:00
brain
fd411d067c
ModeHandler documented
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4161 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08 01:22:46 +00:00
brain
40320969da
Add support for channelmode +i
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4159 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 22:55:47 +00:00
brain
7f4ee2f9f2
Add channel modes +n and +t
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4156 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 22:46:35 +00:00
brain
21480d6f65
Move BanItem into the class
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4152 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 21:51:33 +00:00
brain
2fd5ed7aa9
Started work on ModeParser::CleanMask()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4145 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 21:03:00 +00:00
brain
53e8c67c58
Comments
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4144 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 20:50:25 +00:00
brain
adb17635ee
Added cmode_m (channel mode +m)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4141 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 20:03:17 +00:00
brain
8f9d0a68cd
Mode +b stuff, probably wont work yet
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4133 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 17:37:20 +00:00
brain
2d27d1f9f4
Add cmode_p (private)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4131 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:35:36 +00:00
brain
7666e1ad84
Aaaand, correct all the obligitary typos
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4129 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:29:42 +00:00
brain
a1af610ac1
Added masking stuff.
...
Basically, so that we can hold user modes and channel modes in the same list, we use bitwise masking.
We have a list of handlers, 256 in size 0 through 255, and to work out where a mode handler is dependent
on WHAT it is, we use this simple hashing algorithm (no collisions can occur):
(modeletter - 65) | mask
Where mask is 128 (10000000b) if its a user mode, or 0 (00000000b, duh) if its a channel mode.
Smart, and much faster than using a map of pairs.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4128 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:27:05 +00:00
brain
ace3781303
Mode parser WORKS! (for simple non-parameterized channel modes)
...
Tested with channel mode +s.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4126 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:04:36 +00:00
brain
2d05d8bc33
Header for cmode_s.cpp
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4124 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 14:31:05 +00:00
om
56ded38a45
change std::string's to const std::string references for *Feature() funcs
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4121 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 13:34:10 +00:00
brain
13153694df
Added InspSocket::WantWrite(), InspSocket::OnWriteReady() and private data methods to make it work.
...
See the XXX'ed section for a bit of minor craq
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4120 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 00:18:14 +00:00
om
7e709ca655
modules.*: Put some void* back to char*, sorry if they were only like that because of me... :p
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4119 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 00:16:28 +00:00
om
cba550cb97
Change InspSocket's private members to only be protected, I couldn't find any other way to do this before we get around to rewriting the socket engine.
...
Commit very first, very alpha, not-very functional version of the PostgreSQL module. It compiles..and that's..err..about it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4112 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 16:39:09 +00:00
brain
dc42f264d7
relocate the Move* methods to private: where they belong, rename erase_factory and erase_module to be more appropriate EraseFactory and EraseModule methods
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4098 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 15:07:09 +00:00
brain
75eb9178d5
Make WritePID a public function of class InspIRCd
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4097 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 15:01:32 +00:00
brain
55de6781e0
Move SetSignals(), Start() and DaemonSeed() into private methods of class InspIRCd, move MakeLowerMap() into private: section
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4096 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 14:56:33 +00:00
om
903dbea2b1
Change WriteChannelWithServ and it's _NoFormat to take a const char* servername rather than char* - although it doesn't seem to be used :<
...
Lose some more casts in m_spanningtree, unneeded because of above changes
Make xline_set_creation_time() take const char* rather than char* for it's first parameter, lose more casts in spanningtree because of this
Make do_whois take a const char* rather chan char* nick, lose yet more casts
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4095 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 14:40:53 +00:00
om
3cf1ae0470
Replace rather craq'y loop with a couple of std::string calls
...
Change GetServerDescription to take const char* rather than char*
Change userrec::server from char* to const char*, this is more 'correct' as it's not safe to modify it (pointer as returned by std::string::c_str())
Change WhoWasGroup::server, see above about userrec::server
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4094 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 11:42:09 +00:00