w00t
1552f3918a
Jesus, look who's the commit whore today. More header updates, and removal of namespacing.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5996 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15 21:45:30 +00:00
w00t
3a554ef1e9
Remove global namespacing, makes modules compile FASTAH. Also massive update on headers (change to InspIRCd Development Team, extend copyright to 2007).
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5995 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15 21:33:22 +00:00
brain
827a4bcdb3
Try harder to make sure the ERROR string gets sent when closing a connection
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5994 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15 18:12:37 +00:00
brain
457362304b
Cleaning up irrelevent stuff in channels.cpp
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5993 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15 17:32:16 +00:00
brain
bfca00707e
Remove commented out FlushWriteBuf()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5992 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 21:30:21 +00:00
brain
29d6347953
Remove misc debug
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5991 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 20:43:39 +00:00
brain
458a3297e4
Fix silly bug of the day.
...
User was only getting a userrec::chans entry added if they had any privelages on the channel. If they werent opped, voiced, or halfopped on join, no entry in the hash. Silly brain now added a:
user->chans[Ptr] = 0;
:p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5990 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 20:35:21 +00:00
brain
51b1560725
Remove FlushWriteBuffer() from DoBackgroundUserStuff(). Its no longer required here, it used to try and flush the buffer before we actually monitored write events, long ago, without seeing if it could write first, and wasted cpu. It should be removed now and doesnt seem to affect anything.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5989 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 19:51:56 +00:00
brain
4652f73b9e
CPU Usage percent in stats z! yay!
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5988 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 19:30:42 +00:00
brain
1a59b542f9
Change how users are quit if they get a write error during the things they do.
...
Instead of QuitUser inside FlushWriteBuffer() (potentially *UNSAFE*), go back to using SetWriteError(),
but to ensure we dont get a cascade of bad write events from the socket engine, QuitUser the user before
returning in userrec::HandleEvent, after we can gaurantee ALL other reading or writing is done.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5987 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 17:58:13 +00:00
brain
a78cecbeb9
Refactor userrec::chans.
...
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-14 17:46:47 +00:00
brain
4eb254df41
Refactoring:
...
1) Chain together a resize and an append, to improve the buffer read efficiency
2) eliminate a const char* pointer by doing it purely with string, saving a data copy
3) use iterators rather than ints and vector::size() for spooling motd and rules files to users
4) change a usage of !length() to empty() to make it more readable
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5985 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-14 16:57:52 +00:00
brain
06149e3f2b
Fix m_watch to properly use OnCleanup, and to delete pointer on quit
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5984 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 22:48:55 +00:00
brain
9c2f93089b
Fix configure stuff AGAIN.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5983 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 21:29:34 +00:00
brain
aa5ff42284
On now-ancient freebsd 5.2.1, fix the compile by forcing the $(CC) var down the line into src/modes/Makefile
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5982 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 20:35:54 +00:00
brain
cb3571cf32
Comments
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5981 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 20:24:19 +00:00
brain
a320a5c787
Turn watchlist back to map. watchlist is small, watchentries is large, only watchentries needs to be hash_map
...
(watchentries is the primary index of whos watching each nick, watchlist is the small nicklist attached to each user)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5980 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 20:08:45 +00:00
brain
6bd9e67851
Change m_watch to use hash_map rather than map, because of the large number of entries we deal with it will usually be faster
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5979 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 20:07:08 +00:00
brain
f240285155
Improve the way 005 ISUPPORT is sent to users when they connect, cache it in a much more sane format which is much simpler to spool to them
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5978 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 20:00:33 +00:00
brain
15e70c8fe6
Properly fix 'changed nickname from one thats on your notify to one thats not' condition.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5977 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:38:12 +00:00
brain
0f0f184418
Whoops, one too many params
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5976 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:29:56 +00:00
brain
4adf54ae2a
Fix /nick signoff message
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5975 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:27:58 +00:00
brain
336c9691a5
More to fix.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5974 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:25:44 +00:00
brain
bd9be879cb
Make this behave more like other WATCH implementations
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5973 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:22:09 +00:00
brain
7b703512ca
Fix quite a few whoopsies
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5972 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 19:17:35 +00:00
brain
6f4bf8ffd3
Untested! New m_watch that should be hundreds of times faster (im not joking either)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5971 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-13 18:54:38 +00:00
brain
49311b0c6d
Avoid pointless vsnprintf() when our loglevel doesnt meet requirements
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5970 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 23:31:13 +00:00
brain
ed105d7fef
Remove unused debug
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5969 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 23:27:55 +00:00
brain
1c84dff59d
Improve how we handle ELINEs on connect, turn O(2n) into O(n) (thats the best we can do with g/k/z/q checks for now :( )
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5968 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 23:21:51 +00:00
brain
3679c5ebb7
New clone counting mechanism (this isnt tested yet)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5967 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 22:51:38 +00:00
brain
cc9854655d
Make FounderProtectBase::remove_own_privs a reference, so we can change it on the fly without needing to re-construct the objects
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5966 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 20:57:04 +00:00
brain
acc4f158a3
Someone forgot to do founder too :p
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5965 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 20:54:49 +00:00
brain
8e684cd8cc
Make the world not end when special commits (this will probably break)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5964 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 20:35:56 +00:00
special
93a5caf71e
Fixed a pretty nasty bug that allowed users to +a themselves if deprotectself was enabled (thanks webs)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5963 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 20:31:27 +00:00
special
d6ac94372e
Reverted om's commit so we can keep laughing at him for never doing anything
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5962 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 17:36:40 +00:00
om
c8e5374239
I yell 'LIES' in the face of anyone who says I don't commit
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5961 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 17:35:18 +00:00
brain
4d0d12f35e
AnMaster thinks im not committing enough, so heres a pointless commit for him.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5960 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 17:33:48 +00:00
brain
b9ff03f9bc
More comments
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5959 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 00:22:09 +00:00
brain
fafa6af9cd
Fix trivial broken stat counter
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5958 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 00:17:36 +00:00
brain
d92a8cde88
Whoops, forgot to unpublish the interface!
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5957 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-12 00:03:53 +00:00
brain
33530c338c
irc::string assign(std::string&)
...
std::string assign(irc::string&)
soooo:
irc::string foo = assign(my_std_string);
:p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5956 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:56:22 +00:00
brain
fe98b799b5
Just comments
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5955 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:42:20 +00:00
brain
6e287d0a40
Tidy up a loop a bit so it isnt for(;;) with a break
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5954 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:31:25 +00:00
brain
80410275f7
And fix the typos in it.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5953 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:15:49 +00:00
brain
2ae7e8e433
Attempt another speedup
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5952 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:15:18 +00:00
brain
b0645f0b57
Fix kinda stupid whoopsie
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5951 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:09:55 +00:00
brain
477a07bfb8
Faster, stronger, ...err no, not the million dollar man.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5950 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:04:33 +00:00
brain
b8e387510d
Change how assembling of multiple lines works, avoid data copies
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5949 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 23:02:51 +00:00
special
a85455511c
Fixed a typo in select
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5948 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 22:47:25 +00:00
brain
9172f9d22c
Fix EOF conditions on inspsockets which are having their write() handled by modules
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5947 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-11 22:20:03 +00:00