Commit Graph

2671 Commits

Author SHA1 Message Date
Alexey Sokolov
c8a4668bbf Unload all python modules when modpython is unloaded.
Only user modules were unloaded before.
2012-01-01 16:46:21 +07:00
Alexey Sokolov
0260558155 Show more debug info with --enable-debug 2012-01-01 16:45:45 +07:00
Alexey Sokolov
6443563bd5 Python modules are network mods by default. 2011-12-29 18:58:46 +07:00
Alexey Sokolov
57a51dfd78 Fix codestyle. 2011-12-29 11:52:41 +07:00
Alexey Sokolov
c53cf06425 Merge https://github.com/leedo/znc into motd 2011-12-29 11:49:51 +07:00
Alexey Sokolov
8bb7ea5370 Rework modperl to better integrate with perl.
Now it supports global and network modules.
Fixes github issue #82
2011-12-29 11:35:25 +07:00
Lee Aylward
f4019b6740 send 422 event if MOTD buffer is empty 2011-12-07 19:09:23 -06:00
Alexey Sokolov
9e047a3beb Store all 005 values in a map.
Thanks to jayne for requesting this.
2011-12-04 19:53:26 +07:00
Alexey Sokolov
eb66e58028 autoreply: Honor RFC 2812.
There must not be autoreply for notices.

Thanks to nyuszika7h for noticing this.
2011-11-29 18:51:17 +07:00
Alexey Sokolov
142fdeed33 Merge branch 'master' of github.com:znc/znc 2011-11-28 16:44:36 +07:00
Alexey Sokolov
cecaf2c79a Add a line to AUTHORS... Not with new names though. 2011-11-28 16:43:32 +07:00
Kyle Fuller
44a230c8b7 Remove notes on the GENERATE command in the cert module 2011-11-21 20:20:51 +00:00
Kyle Fuller
b9457274bd nickserv: Use CModCommands 2011-11-21 12:10:14 +00:00
Alexey Sokolov
48a013f758 Merge branch 'master' of github.com:znc/znc 2011-11-19 11:49:19 +07:00
Alexey Sokolov
3fd0429e1e Python: Use znc.Socket if no socket class is specified in CreateSocket()
Thanks to Azelphur for giving this idea.
2011-11-19 11:47:47 +07:00
Kyle Fuller
3945d435d9 Move delete networks out of looping over the clients in CUser::Clone
This was moved in the previous commit when I tried to merge it to the
commit below.
2011-11-13 03:30:30 +00:00
Kyle Fuller
01b15bfb5b Fix webadmin when editing a user
Since this creates a new user, and then clones it. It would clear all
the networks. To fix this, I have made an option bCloneNetworks to
CUser::Clone. This replaces the bCloneChans because this is unnessecery
now.

Fixes #88
2011-11-13 00:28:44 +00:00
Alexey Sokolov
2ffcbed5bb Clarify the last commit a bit using a comment. 2011-11-12 09:46:14 +07:00
Kyle Fuller
0b57b7d437 Properly handle CIRCNetwork's when we rehash
This commit does the following:
- Do not segfault on rehash
- Delete CIRCNetwork's when they are removed from config
- Update to the configs nick/altnick/realname/ident
2011-11-09 20:02:41 +00:00
Kyle Fuller
18989a21c6 Merge branch 'master' of github.com:znc/znc 2011-11-09 20:02:27 +00:00
Kyle Fuller
812ec24105 Don't forward a 670 to a client
This might result in the client switching to SSL if it supports it.
Breaking the current connection
2011-11-08 19:19:22 +00:00
Kyle Fuller
a36d47c947 Add {Add,Del,List}Network to *admin module 2011-11-08 19:19:20 +00:00
Uli Schlachter
e5facdf557 route_replies: Handle raw 482
lahwran reported the following message from *route_replies and also figured out
which message we failed to handle, thanks!

<*route_replies> This module hit a timeout which is possibly a bug.
<*route_replies> To disable this message, do "/msg *route_replies silent yes"
<*route_replies> Last request: MODE #somesecretchannel I

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-08 19:19:20 +00:00
Reuben Morais
7cdf42d571 Clear text colors before appending timestamps to buffer lines 2011-11-08 19:19:19 +00:00
Kyle Fuller
74738a20b7 Fix a NULL pointer issue on CChan::SaveBuff
I also cleaned up a little and loop over vClients once instead of twice
2011-11-07 16:55:55 +00:00
Kyle Fuller
94ffcbed59 Don't forward a 670 to a client
This might result in the client switching to SSL if it supports it.
Breaking the current connection
2011-11-07 16:28:12 +00:00
Kyle Fuller
aa085ef38d Add {Add,Del,List}Network to *admin module 2011-11-05 20:57:22 +00:00
Uli Schlachter
e607b1a559 route_replies: Handle raw 482
lahwran reported the following message from *route_replies and also figured out
which message we failed to handle, thanks!

<*route_replies> This module hit a timeout which is possibly a bug.
<*route_replies> To disable this message, do "/msg *route_replies silent yes"
<*route_replies> Last request: MODE #somesecretchannel I

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-05 12:17:31 +01:00
Alexey Sokolov
96eceba0df Merge branch 'master' of github.com:znc/znc 2011-11-05 12:03:58 +07:00
Alexey Sokolov
8af35e1fe5 Change the order of -I directives in Makefile.
If ZNC was already installed, it had its headers somewhere.
The chances are that something else can be installed at the same place,
including some ZNC's dependency	whose include dir would be included to
CXXFLAGS. Another possibility of including that dir is triggered when
using FreeBSD - ./configure explicitly adds -I/usr/local/include in that
case.

And so we get a directory with old ZNC headers included to CXXFLAGS
before our new shiny ./include.

With their order changed, the proper headers are included now.

Thanks to those who repored the issue, thanks to PsWii60 for helping to
track it down, thanks to my parents for creating me and therefore
enabling me to fix it, and to many other people.
2011-11-05 11:51:53 +07:00
Alexey Sokolov
970b87a5c5 Merge pull request #85 from reubenmorais/master
Clear text colors before appending timestamps to messages
2011-11-04 05:42:55 -07:00
Reuben Morais
6ed3b27af4 Clear text colors before appending timestamps to buffer lines 2011-11-04 00:35:35 -02:00
Alexey Sokolov
0b6d609014 Fix CZNC::Broadcast...
We need a good way to speak to users, not just sending some clients some
stuff...

Thanks to Cronus` for reporting this, as notify_connect failed for him
when using broken broadcast.
2011-11-04 00:04:32 +07:00
Uli Schlachter
a08ec52dbf Don't use "mkdir" during install
lahwran just showed up on irc and told us that he installed znc, but znc failed
to find any modules. The reason for this was his umask 077 which means that
"make install" installed stuff so that only root can access it.

The solution is do use "install -d" since that makes sure to ignore the
currently set umask.

However, google finds results which say that "install -d" might mess with stuff
of pre-existing directories when it shouldn't, so we must first test if the
directory already exists before calling install. Obviously, this makes our
Makefile a lot more readable. :-(

I didn't have time to test this properly, so stuff might break.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-03 09:01:13 +01:00
Alexey Sokolov
73b980bb83 Merge branch 'master' of github.com:znc/znc 2011-11-03 10:51:22 +07:00
Alexey Sokolov
7ac4609408 Check for /usr/bin/swig2.0 too.
SWIG 2 is named that way on Debian-based systems...
2011-11-03 10:49:14 +07:00
Uli Schlachter
a66721eacb webadmin: Add a "Disabled" checkbox for channels
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:44:36 +01:00
Uli Schlachter
9140a0dbd5 CZNC::WriteConfig(): Better --debug output
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:42:36 +01:00
Uli Schlachter
a97abc53f7 Just some small comment explaing some craziness
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:39:34 +01:00
Uli Schlachter
962c10795d Disable some more warnings on mod{perl,python}
It seems to me like swig is trying to trigger every warning that exists...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:37:11 +01:00
Alexey Sokolov
c00ad1a2ff Ups, forgot to change message for python compiler. 2011-10-30 02:21:11 +07:00
Alexey Sokolov
f4097e6fd5 Separate compilation and linking for modules.
To gain more benefits from distcc.
2011-10-30 02:15:26 +07:00
Alexey Sokolov
cf49449dde Be able to remove servers using webadmin.
Thanks for appel for reporting this.
2011-10-30 00:47:11 +07:00
Stéphan Kochen
355f196bbe Working savebuff saving and loading.
It's even backwards compatible!
2011-10-27 19:54:23 +02:00
Stéphan Kochen
c36480c8a1 Store and format time in CBufLine.
Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.

Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
c3d677a4d8 Slight refactor of CBuffer & CBufLine.
This is in preparation of adding more attributes to a CBufLine. Going
forward, at least savebuf will need access to all of these to properly
serialize buffers.

Basically, instead of relying on `GetLine()` to return `false`, the
caller is now expected to check bounds himself using `Size()`.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
cb4131e320 Unify channel buffers and CBuffer. 2011-10-27 18:25:25 +02:00
Stéphan Kochen
948ae2510c Rewrite Buffer to store a format string.
Will use this to allow more parameters to be inserted at the time the
buffers are flushed to the client.
2011-10-27 18:25:24 +02:00
Stéphan Kochen
2fdf54d43d Add string formatting function with named params.
In addition to the formatting function, a matching Escape type is added.
2011-10-27 18:25:24 +02:00
Stéphan Kochen
f7e5b41ab1 Add server time CAP and Client flag. 2011-10-27 18:25:24 +02:00