Commit Graph

27 Commits

Author SHA1 Message Date
Kyle Fuller
a53d997586 Only prepend the timestamps with \0F if they use formatting
This fixes a bug with fish implementation and append timestamps
2012-07-04 16:09:02 +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
ca650a5eb2 Use fabs() instead of abs() for double.
Again thanks to fred.
2012-05-06 10:29:05 +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
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
Kyle Fuller
c54b3d0b87 webadmin: Implement clone user
Closes #127
2012-02-24 17:26:04 +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
Uli Schlachter
1d16d1ce7d Fix a stupid bug in CUser::~CUser()
A CIRCNetwork's destructor removes the network from its associated user's list
of networks. Now that you know this, stare at the diff until you figure out the
problem. Yeah, "ouch".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:16:54 +01:00
Alexey Sokolov
fa287ef791 Make networks a bit less confusing.
If user is connected without network, try "default" network first, if it
exists. If not, try "user" network. If it doesn't exist too, just use
the first one.

Also configs converted from old configs have "default" network instead
of "user" one.
2012-01-27 22:51:09 +07:00
Kyle Fuller
3d7d1793aa Move IRCConnectEnabled to each network instead of a global user setting 2012-01-11 14:49:17 +00:00
Kyle Fuller
4abf3feae4 Remove trailing whitespace 2012-01-11 13:18:54 +00:00
Un1matr1x
73270ff023 Welcome in 2012 2012-01-01 09:30:19 +01: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
Reuben Morais
7cdf42d571 Clear text colors before appending timestamps to buffer lines 2011-11-08 19:19:19 +00: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
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
Kyle Fuller
8659d7224a Make UpdateModule reload the module for every module type
UpdateModule has been moved to CZNC because it doesn't really fit into
CUser. The new UpdateModule will reload the module for global modules,
user modules and network modules.

Fixes #69
2011-10-19 10:47:55 +00:00
Kyle Fuller
3a7d0150cf Don't include Modules.h from User.h 2011-10-19 09:56:21 +00:00
Allan Odgaard
eca0211bb8 Use time zone string instead of offset.
This is done by setting the TZ variable prior to calling localtime() or ctime().

There are a few calls to ctime()/localtime() which doesn’t adjust for time zone offset. This patch affects the behavior of these since the TZ variable is global.
2011-10-09 16:51:19 +02:00
Allan Odgaard
b8247095d1 Introduce time zone (string) setting.
Presently unused but intended to supersede the current time zone offset.

The advantage of a string is that it can be set to something like Europe/Copenhagen and thereby adapt to daylight savings time.
2011-10-09 15:48:03 +02:00
Alexey Sokolov
2c1ca45353 Merge branch 'headers' 2011-09-28 20:15:20 +07:00
Alexey Sokolov
afeab4a9e6 Move core .cpp files to src/ 2011-09-23 03:33:13 +07:00