Colloquy disconnects if it receives a QUIT from the server. Also, the old
behavior wasn't really consistent, a quit was only forwarded if the user was in
any non-detached channels.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1860 726aef4b-f618-498e-8847-2d620e286838
This adds support for the general CAP protocol and the multi-prefix and
userhost-in-names (NAMESX and UHNAMES) to znc. There is no module call for CAP
tokens yet, but if modules really want to "catch" capabilities, we should most
likely add one.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1812 726aef4b-f618-498e-8847-2d620e286838
If you let your ZNC user to itself, you generate a loop. ZNC will send the
"Welcome to ZNC message" to the connected client, which is itself. So it
receives that messages and sends it to its client again, which...
We detect this situation because we see raw 001 two times, which should never
happen on a normal IRC server. To get even less than zero ;) false positive, we
only disconnect if the second raw 001 is from a server called "irc.znc.in".
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1760 726aef4b-f618-498e-8847-2d620e286838
This call works exactly as it did before (well, it no longer creates a
temporary CNick instance), but it's documentation now also describes its current
behavior.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1737 726aef4b-f618-498e-8847-2d620e286838
Now these two module hooks are called in the same order as OnPrivAction() and
OnPrivCTCP().
Additionally, one can now properly block channel action's from reaching the
channel buffer via return HALTCORE; in OnChanAction.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1730 726aef4b-f618-498e-8847-2d620e286838
Before, the query buffer did include regular channel messages, but CTCP ACTIONs
were just discarded. This is now fixed.
Thanks to jarryd for finding and reporting this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1687 726aef4b-f618-498e-8847-2d620e286838
If some client now sets "us" away via /away, new clients will be sent a 306
numeric after login to inform them that they are set /away.
Thanks to nobswolf for the suggestion.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1655 726aef4b-f618-498e-8847-2d620e286838
If this option is set to an ip address, this one is used as the local address
for DCC connections. This can e.g. be used to "fix" DCC bouncing with ipv6
connections. Without it, this just more or less fails badly.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1647 726aef4b-f618-498e-8847-2d620e286838
Thanks to ViciousPotato for reporting that AltNicks were truncated to 9
characters.
We assumed the server's maximum nick length to be 9 by default which made the
code truncate the AltNick to 9 characters.
Now we save the nick we sent last to the IRC server. If the server reports a
"nick is already in use" with a nick shorter than we sent it, we assume this
that the server truncated our nick to the allowed length and use this length for
our retries (appending different characters to the default nick).
Not all irc servers truncate the nick this way if it's too long, on those that
don't this patch shouldn't cause any behavior change.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1620 726aef4b-f618-498e-8847-2d620e286838
Without this we could cause a client desync (ZNC still got the correct
information).
Bug reported by tomaw and patch provided by flakes, thanks.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1583 726aef4b-f618-498e-8847-2d620e286838
/version generates a 005 server reply. We used to cache this reply in the raw
buffer and the next user who logs in then received the same 005 reply multiple
times.
We fix this by adding CBuffer::UpdateExactLine() which does nothing if the exact
same line is already in the buffer. The only place where we (currently?) use
this is the raw 005 reply.
This should fix sf bug #2817124.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1579 726aef4b-f618-498e-8847-2d620e286838
The code checked if every line received from the IRC server started with a
colon and contained at least two spaces using a wildcard comparison. Since not
doing this would violate the IRC specs, we can safely assume this.
This command removes this if and reindents a shitload of code. The only change
in there is a removed comment, everything else should be the same.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1528 726aef4b-f618-498e-8847-2d620e286838
I doubt this makes much of a difference, but some callgrind run with one hour
of #ubuntu pointed to this stuff. Let's hope it's at least a little little
little bit faster now
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1527 726aef4b-f618-498e-8847-2d620e286838
This is mostly done by removing unused members, but there is also removes a
cache which saved how many opped, voiced etc users are on a channel.
This shouldn't result in a big slowdown, since this data is only ever used
for /msg *status listchans.
Also, this replaces the API to access this data with a version which should
be faster especially for big channels.
On amd64 the size of CChan was 600 bytes before and is 400 bytes now.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1301 726aef4b-f618-498e-8847-2d620e286838
CSocket caches the data read from a socket and then looks for lines in there.
If there is no line end, this buffer can grow quite large. This patch now
closes sockets if they get a huge read buffer.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1233 726aef4b-f618-498e-8847-2d620e286838
When our primary nick is already taken, we try a couple of different nicks in
order to be able to connect to the IRC server. This code is now in an
own function.
BTW: CIRCSock::Readline() is still waaay too long.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1149 726aef4b-f618-498e-8847-2d620e286838
This also contains some minor changes to the code. One of those is that we now
also handle namesx and uhnames for channels we don't know.
BTW: CIRCSock::ReadLine() is waaay too long.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1148 726aef4b-f618-498e-8847-2d620e286838
This moves some calls from the raw 366 handler to the JOIN handler and it might
even fix a bug (well, which no one would ever have triggered).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1140 726aef4b-f618-498e-8847-2d620e286838
If we were joining a channel on a server with NAMESX support while a client was
connected that didn't know NAMESX and we received a raw 353 with a trailing
whitespace (UnrealIRCd does this), we were calling std::string::at(0) for an
empty string, which caused some assert to fail and ZNC to die.
This patch fixes this crash bug.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1118 726aef4b-f618-498e-8847-2d620e286838
If you '/msg *status delserver'd your last server, you would get a message
saying ZNC will reconnect, but it didn't. Now those messages look much better.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1117 726aef4b-f618-498e-8847-2d620e286838