Commit Graph

63 Commits

Author SHA1 Message Date
kroimon
3b8134c3b0 Another whitespace/tab mixup fix.
Hopefully the last one...
Again, no functional changes in this commit.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1219 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 14:42:34 +00:00
kroimon
d1b3c2b94d Removed AutoCycle from core
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1191 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 11:23:57 +00:00
psychon
219ae6a572 Add new module call OnMode()
It's basically OnRawMode() but once per single mode.
Oh and this also fixes a problem where ZNC lost track of chan modes with params
(See hunk in CChan::AddMode).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1189 726aef4b-f618-498e-8847-2d620e286838
2008-09-04 10:28:19 +00:00
psychon
fe44108d90 Fix some channel key-related mess ups.
ZNC used to keep track of two channel keys: The current one from the config and
the last one it got from a +k channel mode (/mode #chan is done on join).
The +k one, if it was known, always overwrote the config one and thus the one
from the config doesnt need to be saved anymore.

This patch now makes ZNC only use one var to hold the current channel key
and this key is NOT overwritten for +k on channels.

The reason for the last change: Stupid quakenet. (RFC, anyone?)
In /mode replies quakenet always shows '*' as channel key, if one is set.
This whole patch started with someone reporting that ZNC kept forgetting the
current channel key and used '*' instead...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1186 726aef4b-f618-498e-8847-2d620e286838
2008-09-02 17:25:37 +00:00
psychon
02beef2e07 Use znc.in instead of znc.com
No cookie for that domain catcher at znc.com!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1181 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 09:00:21 +00:00
psychon
2f74755d7a Fix a bug where ZNC always thought all channels where empty
Due to the recent change that ZNC calls SetIsOn(true) when we receive the JOIN,
not the 'end of names' reply, the nick list of a channel was always ignored.
This fixes this bug.

Thanks to cnu for using a svn version and reporting this bug. :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1154 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 18:49:52 +00:00
psychon
3e2b71263f Fix a potential crash bug on channel part (CChan::RemNick())
This function didn't properly check it had a valid iterator *before* using
this iterator (.begin()->second).

Now we first check if that iterator is valid (size() is *not* zero) before we
run this. No behaviour is changed, but the bug is gone. Yay. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1133 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 10:42:27 +00:00
psychon
86924339a3 Add some 'const' attributes to various functions
No real changes in here, only way more constness...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1129 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 08:13:06 +00:00
psychon
3ee049bc5a Teach CUser::Clone() to also handle channel settings
Now rehashing can finally change channel settings, too.

One part of this patch worries me: Detaching / Attaching channels
via rehash. Let's see what happens...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1058 726aef4b-f618-498e-8847-2d620e286838
2008-05-21 14:22:20 +00:00
psychon
c64d7bc108 Force a space between if, for, while and (
This was done via:
   sed -ir 's/if(/if (/g; s/for(/for (/g; s/while(/while (/g' \
        *.h *.cpp modules/*.cpp



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1030 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:08:44 +00:00
psychon
51dd3e2b32 Use unix EOLs (\n) instead of DOS ones (\r\n) for writing znc.conf
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1022 726aef4b-f618-498e-8847-2d620e286838
2008-04-15 14:33:37 +00:00
psychon
8f22dcc60d Fix all those warnings from -Wshadow
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@964 726aef4b-f618-498e-8847-2d620e286838
2008-02-19 20:25:21 +00:00
psychon
f74ab87e19 And fix a shitload of trailing whitespaces and space / tab mixups in ZNC
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@959 726aef4b-f618-498e-8847-2d620e286838
2008-02-16 12:52:11 +00:00
psychon
e72c445694 Clean up includes
All the headers are now self-contained (g++ Header.h -o /dev/null).

Some system headers where moved to the .cpp they are actually needed in,
some of our own headers are includes less. (Especially MD5.h)

Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h
is the first file included.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:31:16 +00:00
psychon
378563abf9 Config writing: Make the <Chan> sections a lot smaller
Buffer, KeepBuffer and AutoCycle are only written if different from the user
settings; Detached is only written when set.

Thanks to SilverLeo for this patch


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@913 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:23:02 +00:00
psychon
eeec633e30 Update copyright header for 2008
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@910 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:13:07 +00:00
psychon
a09a7e79f6 Switch to the copyright headers the GPLv2 wants us to have
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@843 726aef4b-f618-498e-8847-2d620e286838
2007-09-21 18:55:33 +00:00
psychon
6197dbe4c7 Fix UHNAMES support
- messages from server werent parsed right (ident got messed up)
- ZNC generated joins (/detach #chan /join #chan) never included
	the UHNAMES info.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@812 726aef4b-f618-498e-8847-2d620e286838
2007-07-13 17:36:13 +00:00
psychon
c0e3f3bb03 Add JoinTries config var which sets a limit for channel join tries to avoid
flood issues. This var defaults to 0 which means 'No Limit'.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@811 726aef4b-f618-498e-8847-2d620e286838
2007-07-04 20:15:10 +00:00
psychon
b772e2664e Merged rev 838,888,890,894,899,900,902-904,926,934,963,984-989 from crox's branch:
- Changes to specfile
- define PATH_MAX and RTLD_LOCAL if not defines
- compile fixes
- SetFileName should not set m_iFD
- check for cygwin and do not use -fPIC
- replaced if ... elif with case in configure.in
- handle 437 reply code
- allow disabled channels
- use strerror() in CIRCSock::SockError()
- added GetUser() to CClient and CIRCSock
- added support for traffic accounting
- added names to timers


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@806 726aef4b-f618-498e-8847-2d620e286838
2007-05-17 19:09:17 +00:00
prozacx
e8c3ebf477 Applied patches from psychon
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@791 726aef4b-f618-498e-8847-2d620e286838
2007-03-21 16:13:08 +00:00
prozacx
0a62274975 Committing patches from crox/psychon
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@790 726aef4b-f618-498e-8847-2d620e286838
2007-03-12 06:26:54 +00:00
prozacx
6dcacaa79e Added contact info
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@752 726aef4b-f618-498e-8847-2d620e286838
2006-09-13 07:39:48 +00:00
prozacx
0448e24ce3 Use IsChan() function instead of hard coding # and &
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@749 726aef4b-f618-498e-8847-2d620e286838
2006-09-13 02:49:56 +00:00
prozacx
bd8846f1be Added SendBuffer and ClearBuffer client commands
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@745 726aef4b-f618-498e-8847-2d620e286838
2006-08-09 22:31:34 +00:00
prozacx
b740d7cc36 Refactored module hook calling macros into one master macro
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@708 726aef4b-f618-498e-8847-2d620e286838
2006-03-22 08:02:37 +00:00
prozacx
a9e60b43c5 Migrated away from CString::ToString() in favor of explicit constructors
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@669 726aef4b-f618-498e-8847-2d620e286838
2006-02-25 09:43:35 +00:00
prozacx
eab420a13b Fixed some issues when modules were not defined
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@632 726aef4b-f618-498e-8847-2d620e286838
2006-02-10 02:25:49 +00:00
prozacx
a490f62dde Renamed CUserSock to CClient
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@581 726aef4b-f618-498e-8847-2d620e286838
2005-10-15 03:55:09 +00:00
prozacx
aaec84a317 Added preliminary support for multiple clients per user
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@547 726aef4b-f618-498e-8847-2d620e286838
2005-10-09 08:40:40 +00:00
prozacx
76b6988e4f Added AttachUser()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@499 726aef4b-f618-498e-8847-2d620e286838
2005-09-17 04:05:55 +00:00
prozacx
55b1c1fe5c Don't write chan to config if !InConfig()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@498 726aef4b-f618-498e-8847-2d620e286838
2005-09-16 03:00:13 +00:00
prozacx
7e7e85a22f Added GetOptions()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@497 726aef4b-f618-498e-8847-2d620e286838
2005-09-15 04:15:56 +00:00
prozacx
4484999c26 Added WriteConfig()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@436 726aef4b-f618-498e-8847-2d620e286838
2005-07-18 01:57:59 +00:00
prozacx
4df25d55cb Added InConfig() to tell whether this chan is saved in the config or not
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@426 726aef4b-f618-498e-8847-2d620e286838
2005-07-10 23:50:37 +00:00
prozacx
96f1ab2763 Added AutoCycle to CUser
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@411 726aef4b-f618-498e-8847-2d620e286838
2005-07-05 09:23:04 +00:00
prozacx
4491cbb6fc Clear out m_muuPermCount in Reset()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@368 726aef4b-f618-498e-8847-2d620e286838
2005-05-26 21:12:18 +00:00
prozacx
2a5db6722b Fixed ModeChange() to not add list type modes
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@367 726aef4b-f618-498e-8847-2d620e286838
2005-05-26 20:58:52 +00:00
prozacx
3dde793e62 Added global module functionality
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@348 726aef4b-f618-498e-8847-2d620e286838
2005-05-22 00:47:36 +00:00
prozacx
41b5ea4398 Fixed issues with key when joining a 'trying' chan
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@347 726aef4b-f618-498e-8847-2d620e286838
2005-05-20 21:21:40 +00:00
prozacx
b8cd23da5a Fixed bNoChange being passed to OnChanPermission, OnOp, etc
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@294 726aef4b-f618-498e-8847-2d620e286838
2005-05-14 09:56:24 +00:00
prozacx
910fd5a78d Added calls to module hooks: OnChanPermission() OnOp() OnDeop() OnVoice() OnDevoice()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@281 726aef4b-f618-498e-8847-2d620e286838
2005-05-14 00:22:23 +00:00
prozacx
93e5b8575b Added functionality for dynamic modes using ISUPPORT (raw 005)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@278 726aef4b-f618-498e-8847-2d620e286838
2005-05-13 23:22:55 +00:00
prozacx
9e10737339 Fixed Reset() to clear out topic info
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@261 726aef4b-f618-498e-8847-2d620e286838
2005-05-11 01:52:38 +00:00
prozacx
3196299a95 Fixed bug when client tried to cycle.. only attach a user to a chan if it is detached or bForce is set
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@259 726aef4b-f618-498e-8847-2d620e286838
2005-05-10 22:41:49 +00:00
prozacx
428baad29e Changed references to strcasecmp over to CString::CaseCmp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@253 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 10:00:20 +00:00
prozacx
223a660ca1 Moved CUtils::ToString() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@248 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 06:24:40 +00:00
prozacx
078bbcf019 Moved some more functions from CUtils into CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@246 726aef4b-f618-498e-8847-2d620e286838
2005-05-07 11:42:10 +00:00
prozacx
24950d24e4 Moved CUtils::Token() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@244 726aef4b-f618-498e-8847-2d620e286838
2005-05-07 09:18:56 +00:00
prozacx
beb5b49b3f Changed all references to std::string over to CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@240 726aef4b-f618-498e-8847-2d620e286838
2005-05-05 18:11:04 +00:00