Commit Graph

115 Commits

Author SHA1 Message Date
Kyle Fuller
283fe7a72b Send a 464 ERR_PASSWDMISMATCH to clients which do not supply a password
"Returned to indicate a failed attempt at registering a connection for
which a password was required and was either not given or incorrect."
2012-06-02 13:31:49 +01:00
Alexey Sokolov
8231abfe55 Check for all module types on startup.
Instead of only global ones.
2012-06-01 09:39:17 +07:00
Alexey Sokolov
fa0132900e Tell user what's going on before potential crash.
Custom modules compiled for older ZNC can crash ZNC.
Because now ZNC checks for list of available modules on startup in order
to check whether it's installed or not, it can crash right on startup.

Now it outputs nice message about checking for modules before that.

See github issue #172
2012-05-27 13:02:05 +07:00
Kyle Fuller
623ba081b3 rfc1459 states that PART can take multiple channels
Parameters: <channel>{,<channel>}

Fixes #175
2012-05-14 19:38:51 +01:00
Alexey Sokolov
27f42d1118 Rename (non-) KeepBuffer to AutoClearChanBuffer.
It should be a less confusing name...
2012-05-09 22:32:12 +07:00
Alexey Sokolov
ef54786d88 Don't use sprintf().
Thanks to fred for reporting.
2012-05-09 13:00:23 +07:00
Alexey Sokolov
ca650a5eb2 Use fabs() instead of abs() for double.
Again thanks to fred.
2012-05-06 10:29:05 +07:00
Alexey Sokolov
543402cbe2 Delay switch to XHTML until user encodings are implemented...
Webadmin is broken now with non-UTF8 channel names and usernames.
2012-04-19 21:38:51 +07:00
Alexey Sokolov
6bf774d853 Use INET6_ADDRSTRLEN instead of magic number 40.
Also 40 is too small, the string can be longer.
2012-04-18 21:34:23 +07:00
Alexey Sokolov
c48a686f2b Put version info to config during --makeconf
This fixes erroneous message
"Found old config from ZNC < 0.203. Saving a backup of it." when
creating new config.
2012-04-15 10:09:36 +07:00
Alexey Sokolov
f557d4b805 Rename away/autoaway module to awaystore.
Now it at least tries to explain what it does...
2012-04-15 00:06:26 +07:00
Alexey Sokolov
3e458a98e4 Merge some work by Jens-Andre Koch
Only his changes to the core are presented here.
Unfortunately, the skin itself looks ugly on Opera,
and simply doesn't work on Firefox...

Merge branch 'master' into znc-ation

Conflicts:
	modules/data/lastseen/tmpl/lastseen_WebadminUser.tmpl
	modules/data/webadmin/tmpl/settings.tmpl
2012-04-10 23:19:15 +07:00
Uli Schlachter
9b6ea8251c WebModules: Fix a NULL pointer dereference
Commit b1593238d5 started using the module pointer before the NULL
check. This caused crashes whenever someone (even without a login!) accessed a
web page on znc for a module which didn't exist.

Thanks to J0rd4n` for reporting this to us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-09 21:42:04 +02:00
Uli Schlachter
d5b84f50db Fix an dangerous substr() call
A malicious IRCd could send a WHO reply for a nick which consisted completely
out of prefix characters (thus an empty nick). In this case
std::string::find_first_of() would return std::string::npos. This argument would
make std::string::substr() throw an exception and kill the process.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-30 23:13:03 +02:00
Jens-Andre Koch
92ec938150 Added Webskin "znc-ation" 2012-03-28 12:24:27 +02:00
Alexey Sokolov
2f853bee61 A bit more debug output for tdns 2012-03-24 00:36:13 +07:00
Alexey Sokolov
4865a2da0c Serve web pages as utf-8 2012-03-23 11:53:20 +07:00
Alexey Sokolov
9b3a764a6c Use XHTML 2012-03-23 11:14:29 +07:00
Alexey Sokolov
30b99d58f3 Show list of timezones in webadmin. 2012-03-23 01:16:25 +07:00
Alexey Sokolov
1d4d657e23 Deprecate TimezoneOffset 2012-03-22 23:21:25 +07:00
Alexey Sokolov
f0cab46c3f Merge https://github.com/znc/znc/pull/78 (TZ)
Conflicts:
	modules/admin.cpp
	src/User.cpp
2012-03-22 22:58:46 +07:00
Alexey Sokolov
355d5feb7a Move TZ-related code to own place. 2012-03-22 22:20:41 +07:00
Alexey Sokolov
e83efead26 Nicify webadmin interface for flood protection. 2012-03-22 13:22:13 +07:00
Kyle Fuller
6999c8222d ResetJoinTries once we enable a channel
Fixes #83
2012-03-21 22:25:45 +00:00
Kyle Fuller
db7c47f97d Rewrite the JOIN channel logic, dropping MaxJoins
Instead we fill the JOIN line up with as many channels as we can fit in
an IRC line. Rate limiting is done per command now, making MaxJoins
unnecessary.
2012-03-21 22:06:54 +00:00
Alexey Sokolov
fb2b5193bc Show link to http://znc.in from web 2012-03-22 04:27:26 +07:00
Kyle Fuller
38ce17906c Don't forward WHO replies with multi-prefix to unsupported clients 2012-03-21 15:23:16 +00:00
Alexey Sokolov
c98abf00a5 Implement protection from flood.
For ZNC-server connection
2012-03-21 19:48:26 +07:00
Alexey Sokolov
3aa6b581fc Csock: able use non-int number of secs for timer.
This patch happened in upstream csocket too, so update won't break
anything.
2012-03-20 09:03:44 +07:00
Alexey Sokolov
819776873d Add SSL/IPv6/DNS info to znc --version 2012-03-15 01:38:37 +07:00
Alexey Sokolov
ddb1af86fd Ask for port > 1024 in --makeconf
There're so many people who try lower ports and get permission denied :(
Who really wants to use privileged port, can add it using /znc addport
2012-03-10 08:24:19 +07:00
Kyle Fuller
aa9a629bf3 CString("off").ToBool() shouldn't be true 2012-03-06 18:00:43 +00:00
Kyle Fuller
f44b7fc7c4 Clear channel buffers if keep buffer is disabled and we're online 2012-03-06 17:55:14 +00:00
Kyle Fuller
c54b3d0b87 webadmin: Implement clone user
Closes #127
2012-02-24 17:26:04 +00:00
Alexey Sokolov
7ac61474ed ZNC-Extra no more.
Few the most useless modules are just removed, the others are moved to
standard modules.
2012-02-21 19:34:36 +07:00
Kyle Fuller
11e5f7636d Add 381 to the buffer (You are now an IRC Operator) 2012-02-19 14:39:03 +00:00
Uli Schlachter
1dd8d9bf3e Block all signals in DNS threads
A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:26:19 +01:00
Uli Schlachter
252e6d7151 Threaded DNS: Handle spurious wakeups
As DarthGandalf noticed, POSIX allows spurious wakeups from pthread_cond_wait.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:13:25 +01:00
Kyle Fuller
8863d853c9 Allow disabling the use of adding networks for non admins
Closes #122
2012-02-15 16:27:47 +00:00
Kyle Fuller
b9ff3ddcb1 The connect queue shouldn't be unpaused when ZNC starts 2012-02-14 19:34:02 +00:00
Kyle Fuller
59ad967d77 Merge branch 'queue' 2012-02-14 19:32:03 +00:00
Uli Schlachter
0bdb18a427 Threaded DNS: Use a thread pool
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.

To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.

Fixes #132.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-14 20:28:28 +01:00
Kyle Fuller
30fb68023b Pause connect queue should pause and resume a timer
So we don't cheat the connect delay
2012-02-14 19:22:50 +00:00
Kyle Fuller
e47f76db6c Allow the connection queue to be paused 2012-02-14 19:22:33 +00:00
Kyle Fuller
ec1202daf3 {unload,reload}mod: Don't get modinfo if the type is defined
This allows us to unload a module if we supply the type and mod info
cannot be loaded (such as if the module file has been moved).
2012-02-14 12:10:07 +00:00
Kyle Fuller
e08d53dcd5 Show network modules on the web interface menu
Closes #121
2012-02-13 23:58:32 +00:00
Kyle Fuller
5c844cf81a Send nick changes to clients before we use call the OnNick module hook
This fixes a bug where sending anything to a client, such as with
PutModule will fail because it will refer to the new nick before the
client knows about it. The watch module did this.
2012-02-12 20:07:57 +00:00
Kyle Fuller
b1ed9c9b74 Add methods to CModule to get the web path
Add these values to the template and use them when linking to any module
2012-02-09 17:07:28 +00:00
Kyle Fuller
b1593238d5 Make the URL's for web modules include the module type (#121) 2012-02-09 14:19:26 +00:00
silverleo
bb666b0ab7 Fix an Unrecoverable config error issue when reading from an old config.
Default this boolean to true incase there are no networks to loop over. This
will silently drop any network modules for the user, but since there are no
networks anyway it doesn't really matter.
2012-02-05 16:45:00 +02:00