summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
AgeCommit message (Collapse)Author
2006-08-18Missing a space in log messagesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4972 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-18NONBLOCKING LOGGER!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4971 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Just to mess with om's head, remove helperfuncs.h from everywherebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4900 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11CamelCaseRocksSoMuchICamelCasedAllTheMethodsOfClassInspIRCdSoThatItAllLooksNeat.brain
NowSomebodyHasToSpendHoursDocumentingAllOfThisIWonderWhoThatWillEndUpBeing... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4889 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Change to using Instance->Log (InspIRCd::Log) rather than log() macrobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4880 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Now two types of log macro, log() and ilog(). log() assumes an InspIRCd ↵brain
object called ServerInstance, ilog() takes an InspIRCd object as first param. TODO: Run a regexp over these, using perl, to translate them into InspIRCd::Log calls and then eliminate the macro :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4879 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11extern time_t TIME -> InspIRCd::Time()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4873 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move all_opers into class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4857 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Mass-tidyup of module global vars, theyre no longer global vars.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4856 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move tons more stuff into class InspIRCd*, make signal handler functions ↵brain
static members git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4855 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move AllModulesReportReady into a private method of class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4851 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move strlower into nspace namespace where hash<std::string> livesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4850 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move InsertMode into ModeParserbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4849 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move FileExists, CleanFilename, DirValid, GetFullProgDir into class ServerConfigbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4848 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Move IsNick, IsIdent into class InspIRCd, update modules that use it.brain
Change message.h to just a #warning saying its deprecated, and remove all use of it from the core :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4847 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10FindNick, FindChan, ChanModes, UserList, CountInvisible, PurgeEmptyChannels, ↵brain
GetClass, WriteOpers, GetServerDescription -> into classes ServerConfig takes InspIRCd pointer in its constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4832 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09Move tons more stuff into class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4819 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09Move clientlist and chanlist into InspIRCd*brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4818 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09Move fd_ref_table into class InspIRCd*brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4817 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09Tidy up loglevel enum (remove some C-ish defines)brain
change ServerConfig to pass a pointer to 'this' to Validation etc functions git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4811 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09do_log -> static void InspIRCd::Log() (with vararg and std::string variants)brain
The #define for this still exists, but maybe should be phased out? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4809 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09ServerConfig extern moved into class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WriteWallops() -> userrec::WriteWallops() (originates from a user, so ↵brain
belongs in userrec) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4802 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WriteCommon() and WriteCommonExcept() -> userrec::WriteCommon(), ↵brain
userrec::WriteCommonExcept() WriteCommon_NoFormat() and WriteCommonExcept_NoFormat() -> std::string variants git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4800 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WHEEEEE!!!!!brain
All of: Write(), WriteTo(), WriteFrom(), WriteServ() are now methods of userrec. Write_NoFormat(), WriteTo_NoFormat(), WriteFrom_NoFormat(), WriteServ_NoFormat() are now std::string-taking overloaded methods of the functions above All modules updated to use new syntax, my fingers hurt :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4798 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08AddOper() and DeleteOper() -> userrec::Oper() and userrec::UnOper() (these ↵brain
do more, too) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4792 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-08WriteChannel* functions and ChanExceptSender* functions are now methods of ↵brain
chanrec. They probably should be renamed too eventually. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4788 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-06Support CIDR, CIDR zline, /oper and CIDR <connect> tags. NOTE: With CIDR ↵brain
oper, ident field is not supported (yet) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4732 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-04Change to using userrec::ip as a sockaddr to store port, ip and address ↵brain
family, rather than userrec::ip4 and userrec::port. This allows us to handle remote ipv6 users on an ipv4 server, and vice versa. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4694 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if ↵brain
this works yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28Change all references to voodoo numbers (7, 3 etc) to the new bitwise ↵brain
constants for user->registered Change a lot of user->fd > -1 to use the IS_LOCAL() macro git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4569 e03df62e-2008-0410-955e-edbf42e46eb7
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