summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
AgeCommit message (Collapse)Author
2006-07-28Change some if fd > -1 to IS_LOCAL macrobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4568 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Increase size to unsigned longbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4448 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Completely remove need for memset.brain
When we uniq_id++, we can wrap to 0 theoretically after 4 billion output messages, HOWEVER, when we do, 0 will be a valid comparison within the array :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4447 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Fix MOTDbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4442 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Change size of already_sent from char to int to work with uniq_id valuebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4438 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Speed up writecommon, writecommon_noformat, writechannel, etc (by quite a ↵brain
bit) - eliminate 99.99999999999% of the memsets git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4437 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19Fix motd with new bufferingbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4434 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-18Tried to implement sprintf that returns std::string of any size, realized it ↵brain
would scale like unreal scales to ircnet (e.g. it wouldnt!) so took it back out. Moved chop() functionality into userrec::AddWriteBuf and make it nicer (no strlen) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4433 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-08Add userrec::HasMode, fix some typos.brain
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-08Refactored user modes to work like the channel modes - core and module data ↵brain
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-01Change WriteChannelWithServ and it's _NoFormat to take a const char* ↵om
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-01Replace rather craq'y loop with a couple of std::string callsom
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-01forward port of r4092w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4093 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29Change log() to a #define, the real symbol is now do_log(), the new macro ↵om
auto-prefixes all log messages with the file and line number where log() was called - should be nice for debugging and telling wtf is coming from what.Currently uses a (probably very standard) g++ extension to make the macro work. Shouldn't be an issue. You must make clean and rebuild all of insp. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4081 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-24Forwardport of safety fixes for Write* functionsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4056 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-12If the <ALLOW> or <DENY> tag specifies an ip, and this user resolves,brain
then their ip will be taken as 'priority' anyway, so for example, <connect allow="127.0.0.1"> will match joe!bloggs@localhost git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3997 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-08Fix for mode string getting cut, breaks on some +Lbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3995 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-28Error checking of raise(), so that if theres no coredump and raise fails, we ↵brain
know why :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3915 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-28signal/raise in the sigsegv handler to re-raise the sig for a coredumpbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3913 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-24Fix various typos and warningsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3907 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-24delete operator tracking in debug mode (using a macro -- live with it.)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3904 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-20execinfo - backtrace() and backtrace_symbols() where availablebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3887 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-09Shuffle some more includes around, const reference a few functions in inspircd.*om
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3854 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-08Split inspircd_io.* insp inspsocket.* and configreader.* with a few odd bits ↵om
going into inspircd.*, doesn't look like I've broken anything... :P git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3847 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-07Make WriteServ use WriteServ_NoFormat, code duplication = bad >:/om
Change some weirdness using a stringstream for a simple append. Force a flush of all opers' write buffers after they get the oper notice about a /DIE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3842 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-07Slight optimisation to config reader, looks nicer even if it's not faster.om
Make ./inspircd script use -nolog (it already used -debug, which didn't exist until now!?) Add commandline options -nolog and -debug, -debug forces all log messages to be output regardless of level. -nolog stops the logfile being written, so you can run with -debug without filling up your disk. make clean && make install, apparently some of the core doesn't depend on inspircd_io.h in the makefiles..so it'll probably segfault if you don't. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3841 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-06Holy christ that was a LOT OF SPACES. TABS, USE THEM, LOVE THEM, APPRECIATE ↵w00t
THEM - we now have no stupid spaces. This was mostly a mass find/replace, so some indentation may be stuffed. Minor issue, though. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3838 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-04Add WriteOpers_NoFormat, now to remember what I wanted it forom
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3824 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-04All new shiny config parser, there's probably some bugs there somewhere but ↵om
hey...I've been up all night. make clean before you try and compile this. Really. And nobody dare complain git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3817 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-04This doesn't belong in userprocess.cpp. :Pw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3811 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-21Tidyup: (unsigned) cast to more explicit (unsigned char)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3746 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-20Trivial: ServerPrivmsgAll() sending Noticesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3743 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-19LUSERS oper count was broken and reporting the oper count to always be equal ↵brain
to the number of users (whoops) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3738 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-12Fixed a missing reference to chanrec::modesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3693 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-12*NEEDS TESTING* changed binarymodes to use the custom_modes entriesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3691 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-11Start of conversion to const refs for std::strings in module api - A LOT OF ↵brain
STUFF WONT WORK YET git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3654 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-11Tidyup by making some thing sprintf only once rather than n times (where n ↵brain
is number of targets) String reference stuff for one function git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3653 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-10Another const reference conversion, and remove redundant declaration of ↵om
userrec* Find() from globals.h git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3633 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-10patch <inspircd-userlist-ptr-safety.diff (Thanks nenolod)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3630 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Typical. 0 and 1 to choose from, and i pick the wrong one. (back to front ↵brain
binary) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3594 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Modes the wrong way aroundbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3590 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09(Needs test) Improved userlist()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3589 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Added userrec::modebits - fast way of checking if user has +swi rather than ↵brain
an icky strchr git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3588 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Fixed to correctly use iteratorbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3583 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Probably wont compile yet - purge_empty_channels refactorbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3579 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09mptr++ not *mptr++!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3578 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-09Fix buffer overflow (visible in /mode #channel)om
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3577 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-08Fixed externsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3561 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-08Removed has_channel(userrec*,chanrec*), the new preferred way of doing it is ↵brain
channel->HasUser(userrec) Yeah its the other way around to the old way, but somehow, seems less backwards to me (its also faster) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3560 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-08Got rid of all that ugly char* cast crap (todo: change docs to reflect change)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3556 e03df62e-2008-0410-955e-edbf42e46eb7