quassel.git
7 years agoproperly rewind oidentd config file
Daniel Albers [Wed, 8 Feb 2012 00:45:00 +0000 (01:45 +0100)]
properly rewind oidentd config file

7 years agoOidentdConfigGen: tweak signals, names and stuff
Daniel Albers [Wed, 8 Feb 2012 00:23:36 +0000 (01:23 +0100)]
OidentdConfigGen: tweak signals, names and stuff

7 years agoadd oidentd cli options to quasselcore
Daniel Albers [Tue, 7 Feb 2012 23:07:59 +0000 (00:07 +0100)]
add oidentd cli options to quasselcore

     --oidentd                              Enable oidentd integration
     --oidentd-conffile=[OIDENTD-CONFFILE]  change path to oidentd configuration file

7 years agoSort cli options in --help output
Daniel Albers [Tue, 7 Feb 2012 22:53:43 +0000 (23:53 +0100)]
Sort cli options in --help output

Since QHash doesn't offer sorting, replace CliParser's QHash argsHash with
a QMap.
This only affects our own cliParser, i. e. only executables without KDE
integration.

7 years agofirst working version of oidentd support - broken, WIP
Daniel Albers [Mon, 6 Feb 2012 23:43:48 +0000 (00:43 +0100)]
first working version of oidentd support - broken, WIP

7 years agooidentd support - WIP
Daniel Albers [Mon, 6 Feb 2012 01:28:56 +0000 (02:28 +0100)]
oidentd support - WIP

7 years ago--typos
Daniel Albers [Sun, 5 Feb 2012 15:58:57 +0000 (16:58 +0100)]
--typos

7 years agomake socket connection details available in CoreNetwork
Daniel Albers [Sun, 5 Feb 2012 15:58:35 +0000 (16:58 +0100)]
make socket connection details available in CoreNetwork

7 years agoallow automatic client reconnect to be < 30s
Daniel Albers [Tue, 7 Feb 2012 13:27:14 +0000 (14:27 +0100)]
allow automatic client reconnect to be < 30s

7 years agofix core output when using neither syslog nor logfile
Daniel Albers [Sun, 5 Feb 2012 22:11:30 +0000 (23:11 +0100)]
fix core output when using neither syslog nor logfile

7 years agoChanged Buffer-switching behaviour so that it changes between networks as well as...
Chris Le Sueur [Wed, 3 Aug 2011 01:16:27 +0000 (02:16 +0100)]
Changed Buffer-switching behaviour so that it changes between networks as well as channels

7 years agoFix tabcompletion with added space mid-sentence
Manuel Nickschas [Fri, 3 Feb 2012 14:42:44 +0000 (15:42 +0100)]
Fix tabcompletion with added space mid-sentence

7 years agoWork around problems in QTreeView when using Qt 4.8
Manuel Nickschas [Fri, 3 Feb 2012 12:04:08 +0000 (13:04 +0100)]
Work around problems in QTreeView when using Qt 4.8

Looks like having animated QTreeViews lead to problems with rendering nested trees.
This affects both the NickView and BufferView. Maybe it's something in our code,
but looks like simply disabling animations for Qt >= 4.8 does the trick as well...

7 years agoDon't log to stdout if --syslog and/or --logfile are specified
Manuel Nickschas [Sun, 29 Jan 2012 23:23:37 +0000 (00:23 +0100)]
Don't log to stdout if --syslog and/or --logfile are specified

7 years agoDon't ask for the syslog option if we don't have syslog support compiled in
Manuel Nickschas [Sun, 29 Jan 2012 23:18:45 +0000 (00:18 +0100)]
Don't ask for the syslog option if we don't have syslog support compiled in

7 years agoAdd checks for the right amount of parameters to random IRC events, found by ircfuzz.c.
Martin Sandsmark [Thu, 26 Jan 2012 23:08:12 +0000 (00:08 +0100)]
Add checks for the right amount of parameters to random IRC events, found by ircfuzz.c.

Fixes #1136.

7 years agoBring Quassel to front on tray icon click
Manuel Nickschas [Sun, 29 Jan 2012 22:49:56 +0000 (23:49 +0100)]
Bring Quassel to front on tray icon click

When the quassel window is below other windows it would be nice to have it raised on top of
the others when clicking on the system tray icon. Now it is just hidden and you have to click
on it once more to get it to the top.

Fixes #1135. Thanks to parapente for the patch!

7 years agofix plurals in some translations and a typo in ChannelListDlg
Daniel Albers [Tue, 24 Jan 2012 16:04:01 +0000 (17:04 +0100)]
fix plurals in some translations and a typo in ChannelListDlg

7 years agoproper plurals for en_US
Daniel Albers [Tue, 24 Jan 2012 14:55:18 +0000 (15:55 +0100)]
proper plurals for en_US

7 years agostop lconvert from complaining about plurals
Daniel Albers [Mon, 23 Jan 2012 23:50:54 +0000 (00:50 +0100)]
stop lconvert from complaining about plurals

Weird issue. lconvert of Qt 4.7.4 complains when:

 a) … there are msgstr[x] with x > nplurals=y, i. e. translations for
    more plural forms than the language actually has.
    Understandable, so we remove redundant plurals with black voodoo:
      for pofile in *.po; do
        IFS='=' read var plurals \
          < <(egrep -o 'nplurals=[[:digit:]]+' $pofile);
        maxplural=$(egrep -o 'msgstr\[[[:digit:]]+\]' $pofile |
                    egrep -o '[[:digit:]]+' | sort -rn | head -n 1);
        for ((i=$plurals; i<=$maxplural; i++)); do
          sed -i -re "/^msgstr\[$i\]/d;" $pofile;
        done;
      done

 b) … the .po path contains a '/'.
    Huh? Yeah.
    `lconvert -i xy.po …` is fine.
    `lconvert -i ./xy.po …` produces an error.

    So we're running lconvert from ${CMAKE_SOURCE_DIR}/po now.

7 years agomark some strings untranslatable
Daniel Albers [Mon, 23 Jan 2012 22:16:16 +0000 (23:16 +0100)]
mark some strings untranslatable

7 years agoSASL ≠ SSL
Daniel Albers [Mon, 23 Jan 2012 22:14:01 +0000 (23:14 +0100)]
SASL ≠ SSL

7 years agoadd proper msgctxts to all translations
Daniel Albers [Mon, 23 Jan 2012 20:44:00 +0000 (21:44 +0100)]
add proper msgctxts to all translations

+ various minor fixes to make gettext and Transifex happy

7 years agofix Hungarian and Portuguese translations
Daniel Albers [Mon, 23 Jan 2012 10:10:14 +0000 (11:10 +0100)]
fix Hungarian and Portuguese translations

7 years agoMake .pot Transifex compliant
Daniel Albers [Mon, 23 Jan 2012 09:24:57 +0000 (10:24 +0100)]
Make .pot Transifex compliant

Thanks a lot to Ratnadeep Debnath of Indifex

7 years agoupdate quassel.pot
Daniel Albers [Sun, 22 Jan 2012 23:37:16 +0000 (00:37 +0100)]
update quassel.pot

7 years agoupdate Spanish translation
Daniel Albers [Sun, 22 Jan 2012 23:30:03 +0000 (00:30 +0100)]
update Spanish translation

Many thanks to Rafael Belmonte <EagleScreen@gmail.com>

7 years agonew file: po/pull-from-transifex.sh
Daniel Albers [Sun, 22 Jan 2012 23:12:38 +0000 (00:12 +0100)]
new file:   po/pull-from-transifex.sh

Updates translations via `tx` and commits

7 years agoUpdate translations from Transifex
Daniel Albers [Sun, 22 Jan 2012 23:12:20 +0000 (00:12 +0100)]
Update translations from Transifex

Many thanks to:
 - es: Javier Llorente <javier@opensuse.org>
 - fi: Larso <larso@gmx.com>
 - fr: GrecKo <gr3cko@gmail.com>
 - nl: redmar <redmar@ubuntu-nl.org>

7 years agoimport launchpad translations
Daniel Albers [Thu, 25 Aug 2011 21:58:24 +0000 (23:58 +0200)]
import launchpad translations

7 years agoupdate quassel.pot
Daniel Albers [Thu, 25 Aug 2011 21:09:52 +0000 (23:09 +0200)]
update quassel.pot

7 years agoupdate translations from transifex + minor corrections
Daniel Albers [Thu, 25 Aug 2011 21:08:12 +0000 (23:08 +0200)]
update translations from transifex + minor corrections

7 years agoTransifex 1.0 integration
Daniel Albers [Wed, 15 Dec 2010 16:30:43 +0000 (17:30 +0100)]
Transifex 1.0 integration

7 years agoFix #984 without breaking topic input
Manuel Nickschas [Sun, 22 Jan 2012 20:12:13 +0000 (21:12 +0100)]
Fix #984 without breaking topic input

Queued connection ensures that the textEdit is already reset() when InputWidget
does its thing, thus solving the history issues.

Approved by Tucos reading it 10 times. :>

7 years agoRevert "Reset the input prior to processing it in order to prevent issues with per...
Manuel Nickschas [Sun, 22 Jan 2012 20:04:44 +0000 (21:04 +0100)]
Revert "Reset the input prior to processing it in order to prevent issues with per-chat history. fixes 984"

This reverts commit b56a8712f3063e93b68bfa6bd8f2ec67e955df50.

That solution had the side effect that the textEdit would already been cleared when the textEntered() signal
was sent out. This broke the assumption that consumers of that signal could access the edit's content.
We'll find a better solution for the history problems.

7 years agoLog-related cli options are not present in client-only mode
Manuel Nickschas [Sun, 22 Jan 2012 17:20:24 +0000 (18:20 +0100)]
Log-related cli options are not present in client-only mode

Looks like KDE does not like it if we ask for an option that hasn't
been specified.

7 years agoFix compiler warnings
Manuel Nickschas [Sat, 21 Jan 2012 19:01:51 +0000 (20:01 +0100)]
Fix compiler warnings

New gcc seems to be better at finding issues like unused (but set) variables,
so fix those.

7 years agoFix and improve logging support
Manuel Nickschas [Sat, 21 Jan 2012 18:52:15 +0000 (19:52 +0100)]
Fix and improve logging support

It's really inefficient to parse command line options and open the logfile on every message
we log, so move that into the global Quassel class instead. Also fix CMakeLists.txt to
actually enably syslog support in the code, and allow for logging to both syslog and a file.

7 years agoIntroduce possibility to use syslog.
Tomas Chvatal [Fri, 1 Oct 2010 08:31:13 +0000 (10:31 +0200)]
Introduce possibility to use syslog.

Signed-off-by: Tomas Chvatal <scarabeus@gentoo.org>
7 years agoadded new user input command 'showkey"
Johannes Huber [Fri, 18 Mar 2011 14:06:32 +0000 (15:06 +0100)]
added new user input command 'showkey"

displays the crypt key for <nick|channel> if exists,
closes #1069

7 years agoIn kFreeBSD the library dl is not linked
Thomas Mueller [Wed, 13 Apr 2011 20:28:40 +0000 (22:28 +0200)]
In kFreeBSD the library dl is not linked

The toolchain in sid on kFreeBSD has changed and the library
dl is no longer linked implicit. fixes #1072

7 years agoDisables JavaScript, which fixes #1089 and other issues related to modal dialogs...
Chris Moeller [Sun, 7 Aug 2011 23:26:55 +0000 (16:26 -0700)]
Disables JavaScript, which fixes #1089 and other issues related to modal dialogs inside the preview crashing when the preview is destroyed.

7 years agoWe really don't want to depend on qtui in uisupport
Manuel Nickschas [Fri, 20 Jan 2012 18:26:32 +0000 (19:26 +0100)]
We really don't want to depend on qtui in uisupport

It's also not needed, we can access the ActionCollection through GraphicalUi.

7 years agoMake tabcompletion key configurable via shortcuts. fixes 1018
Bas Pape [Sun, 7 Aug 2011 14:55:40 +0000 (16:55 +0200)]
Make tabcompletion key configurable via shortcuts. fixes 1018

7 years agoUnhide buffer when joining or querying and it was temporarily hidden. fixes #866
Bas Pape [Sat, 6 Aug 2011 22:50:33 +0000 (00:50 +0200)]
Unhide buffer when joining or querying and it was temporarily hidden. fixes #866

7 years agoDon't use a const ref for bool
Manuel Nickschas [Fri, 20 Jan 2012 17:38:29 +0000 (18:38 +0100)]
Don't use a const ref for bool

7 years agoAdd support for adding a space when tab-completing mid-sentence
Bas Pape [Thu, 4 Aug 2011 14:16:06 +0000 (16:16 +0200)]
Add support for adding a space when tab-completing mid-sentence

7 years agoAdd some const correctness to Network
Bas Pape [Sat, 6 Aug 2011 10:34:21 +0000 (12:34 +0200)]
Add some const correctness to Network

7 years agoReset the input prior to processing it in order to prevent issues with per-chat histo...
Bas Pape [Tue, 1 Nov 2011 22:14:21 +0000 (23:14 +0100)]
Reset the input prior to processing it in order to prevent issues with per-chat history. fixes 984

8 years agoFix core crash
Manuel Nickschas [Thu, 8 Sep 2011 18:56:32 +0000 (20:56 +0200)]
Fix core crash

Some CTCP requests triggered a bug in the parser; this fixes the issue.

8 years agoFix compiler warning (case value not in enum)
Manuel Nickschas [Sun, 3 Jul 2011 14:21:38 +0000 (16:21 +0200)]
Fix compiler warning (case value not in enum)

8 years agopo: Update czech translation to be more smooth wrt rest of kde translations. Thanks...
Tomas Chvatal [Tue, 28 Jun 2011 15:39:17 +0000 (17:39 +0200)]
po: Update czech translation to be more smooth wrt rest of kde translations. Thanks to Vit Pelcak for the help.

8 years agoFixes #960 - "Core crashes after deleting a Network without disconnecting the Network...
Marcus Eggenberger [Fri, 3 Jun 2011 11:56:37 +0000 (13:56 +0200)]
Fixes #960 - "Core crashes after deleting a Network without disconnecting the Network first"
Note: this fixes the issue only in the 0.7 branch. Quassel Cores built from current git master
will still crash. This is due to some unsave pointer handling in the new event system, which
needs thorough fixing.

8 years agoChanging the behavior how Quassel Events are processed.
Marcus Eggenberger [Tue, 14 Jun 2011 22:45:39 +0000 (00:45 +0200)]
Changing the behavior how Quassel Events are processed.
They are no longer scheduled individualy but processed immediately
when they are generated. this should prohibit quassel from messing
with the space time continuum.

8 years agocheck for qca provider plugin, fixes #1045
Johannes Huber [Thu, 17 Mar 2011 13:19:18 +0000 (14:19 +0100)]
check for qca provider plugin, fixes #1045

Prevents core from crashing when qca provider plugin is missing.
The plugin is needed at runtime. Can occurres when packagers did
not install it.

8 years agoshow notices in current buffer by default
Daniel Albers [Mon, 20 Dec 2010 11:45:04 +0000 (12:45 +0100)]
show notices in current buffer by default

8 years agofixing typo
Stefan Beller [Mon, 14 Feb 2011 12:57:08 +0000 (13:57 +0100)]
fixing typo

8 years agodespammificating the pglog
Marcus Eggenberger [Tue, 1 Feb 2011 22:18:23 +0000 (23:18 +0100)]
despammificating the pglog
This is done by switching from EAFP to LBYL (although I don't like this...)

8 years agoReworking handling of Prepared Queries in PostgreSQL
Marcus Eggenberger [Sun, 30 Jan 2011 23:08:53 +0000 (00:08 +0100)]
Reworking handling of Prepared Queries in PostgreSQL
- Quasselcore should now survive PG restarts :)
- Fixes Bug #1044

9 years agoDon't have CTCP ignore rules apply to ACTIONs
Manuel Nickschas [Tue, 26 Oct 2010 15:04:46 +0000 (17:04 +0200)]
Don't have CTCP ignore rules apply to ACTIONs

This accidentally slipped in 0f2c520a7. It's not at all intuitive for a user why
/me should be a CTCP event, so we don't want to apply the CTCP ignore rules to that.

9 years agoBulk-insert messages into the db (again)
Manuel Nickschas [Mon, 25 Oct 2010 09:09:43 +0000 (11:09 +0200)]
Bulk-insert messages into the db (again)

This accidentally got slaughtered while moving to the new event backend. Now
messages are buffered in CoreSession until the event queue is empty, which means
that a bulk of incoming messages will completely be processed before inserting into
the database, resulting in a huge performance gain.

This buffers even more aggressive than the old version, as we process Qt events in between,
which means we'll receive and process any additional data from the socket before flushing the
message queue. The downside is that nothing will arrive in the client as long as your socket gets
flooded, but on the other hand, it will greatly reduce db I/O in such cases.

9 years ago[PSQL] properly preparing insert_sender queries (in all cases) before using them
Marcus Eggenberger [Sun, 24 Oct 2010 14:02:58 +0000 (16:02 +0200)]
[PSQL] properly preparing insert_sender queries (in all cases) before using them

9 years agowarnings--
Manuel Nickschas [Sun, 24 Oct 2010 12:20:15 +0000 (14:20 +0200)]
warnings--

9 years agoFix trimming
Manuel Nickschas [Fri, 22 Oct 2010 10:13:26 +0000 (12:13 +0200)]
Fix trimming

9 years agoKill IrcServerHandler and CtcpHandler
Manuel Nickschas [Wed, 20 Oct 2010 17:35:54 +0000 (19:35 +0200)]
Kill IrcServerHandler and CtcpHandler

Since all incoming traffic is handled by the event system now and porting is complete,
there's no need for the pitiful reminders of the afforementioned handlers to exist anymore.

Thus, kill them with a vengeance.

9 years agoEvent backend porting - CTCP
Manuel Nickschas [Wed, 20 Oct 2010 17:01:30 +0000 (19:01 +0200)]
Event backend porting - CTCP

This makes the last missing bits of ircd input processing use events;
CTCP handling is now done by both CoreSessionEventProcessor (for the functional parts)
and EventStringifier (for the user-visible parts).

9 years agoAllow arbitrary method prefix for BasicHandler
Manuel Nickschas [Tue, 19 Oct 2010 18:56:21 +0000 (20:56 +0200)]
Allow arbitrary method prefix for BasicHandler

This is mainly for making things a bit more readable in some cases. "handle" is still the
default.

9 years agoIntroduce CtcpParser for CTCP-related event processing
Manuel Nickschas [Tue, 19 Oct 2010 18:45:07 +0000 (20:45 +0200)]
Introduce CtcpParser for CTCP-related event processing

Functionality from CtcpHandler has been ported over to CtcpParser to process
IrcEventRawMessage events and generate appropriate MessageEvents and CtcpEvents from the
raw input of PRIVMSG and NOTICE.

CtcpEvents are not handled/stringified yet.

9 years agoFix event propagation
Manuel Nickschas [Sun, 17 Oct 2010 19:11:58 +0000 (21:11 +0200)]
Fix event propagation

It sometimes makes sense to deliver the same event to the same object
(but different event handlers), so we shouldn't prevent that. Instead,
make sure that generic handlers are not called if at least one specialized
handler is registered.

9 years agoUse late CoreSessionEventProcessor handler rather than early EventStringifier ones
Manuel Nickschas [Wed, 13 Oct 2010 22:53:17 +0000 (00:53 +0200)]
Use late CoreSessionEventProcessor handler rather than early EventStringifier ones

Makes more sense that way. A few commands (kick, part, quit, nick) need to be handled
in the session *after* they generated a MessageEvent.

9 years agoEvent backend porting
Manuel Nickschas [Wed, 13 Oct 2010 21:22:45 +0000 (23:22 +0200)]
Event backend porting

PING

9 years agoEvent backend porting
Manuel Nickschas [Wed, 13 Oct 2010 20:50:44 +0000 (22:50 +0200)]
Event backend porting

Port netsplit handling from IrcServerHandler to CoreSessionEventProcessor, and port
related commands: JOIN, QUIT, MODE, RPL_CHANNELMODEIS (324)

9 years agoEmit a new signal CoreSession::networkDisconnected(NetworkId)
Manuel Nickschas [Wed, 13 Oct 2010 19:44:32 +0000 (21:44 +0200)]
Emit a new signal CoreSession::networkDisconnected(NetworkId)

9 years agoSet current time on creation of MessageEvents if no other time is given
Manuel Nickschas [Wed, 13 Oct 2010 19:41:13 +0000 (21:41 +0200)]
Set current time on creation of MessageEvents if no other time is given

While we can probable leave the timestamp uninitialized for other event types, we certainly
always need a valid time for messages.

9 years agoEvent backend porting
Manuel Nickschas [Sun, 10 Oct 2010 11:54:43 +0000 (13:54 +0200)]
Event backend porting

ERR_ERRONEUSNICKNAME (432), ERR_NICKNAMEINUSE (433), ERR_UNAVAILRESOURCE (437)

9 years agoEvent backend porting
Manuel Nickschas [Fri, 8 Oct 2010 14:31:24 +0000 (16:31 +0200)]
Event backend porting

RPL_INVITING (341), RPL_WHOREPLY (352), RPL_NAMREPLY (353), RPL_ENDOFWHOWAS (369)

9 years agoEvent backend porting
Manuel Nickschas [Fri, 8 Oct 2010 06:58:18 +0000 (08:58 +0200)]
Event backend porting

RPL_ISUPPORT (005), RPL_LIST (322), RPL_LISTEND (323), channel creation time (328)
and homepage (329), RPL_NOTOPIC (331), RPL_TOPIC (332), "topic set by" (333)

9 years agoAdd a checkParamCount() for EventStringifier as well
Manuel Nickschas [Fri, 8 Oct 2010 06:56:45 +0000 (08:56 +0200)]
Add a checkParamCount() for EventStringifier as well

Many events are not being processed by CoreSessionEventProcessor (which checks
for a sane param count for the event it handles, so we don't do that in the
stringifier usually); for those that go directly to the stringifier, we need to
check there.

9 years agoEvent backend porting, mostly WHOIS-related stuff
Manuel Nickschas [Thu, 7 Oct 2010 09:55:43 +0000 (11:55 +0200)]
Event backend porting, mostly WHOIS-related stuff

RPL_WHOISSERVICE (307), RPL_SUSERHOST (310), RPL_WHOISUSER (311), RPL_WHOISSERVER (312),
RPL_WHOISOPERATOR (313), RPL_WHOWASUSER (314), RPL_ENDOFWHO (315), RPL_WHOISIDLE (317),
RPL_ENDOFWHOIS (318), RPL_WHOISCHANNELS (319), RPL_WHOISVIRT (320), RPL_WHOISACCOUNT (330)

9 years agoAdd a timestamp to events
Manuel Nickschas [Thu, 7 Oct 2010 07:45:33 +0000 (09:45 +0200)]
Add a timestamp to events

This is not set automatically for now, as I'm not sure if it's worth the overhead
of querying the system clock for every event we create.

The timestamp is set on reception of data on the socket (i.e. a bit earlier in the chain
than in the old message handling) and carried over into IrcEvents by the IrcParser.
EventStringifier will carry over the timestamp to MessageEvents.

9 years agoIntroduce a flag EventManager::Silent
Manuel Nickschas [Thu, 7 Oct 2010 07:04:31 +0000 (09:04 +0200)]
Introduce a flag EventManager::Silent

If this is set, the EventStringifier won't generate a MessageEvent for this event.
This is thought for the CoreSessionEventProcessor (and possibly scripts) to hide
messages in certain cases, without circumventing further processing of the event.
Example would be suppressing WHO messages on autowho.

9 years agoEvent backend porting
Manuel Nickschas [Wed, 6 Oct 2010 09:08:14 +0000 (11:08 +0200)]
Event backend porting

RPL_AWAY (301), RPL_UNAWAY (305), RPL_NOWAWAY (306)

Also replacing the fixed strings from the ircd by a translateable version.

9 years agoFix an issue with the event loop
Manuel Nickschas [Wed, 6 Oct 2010 07:28:59 +0000 (09:28 +0200)]
Fix an issue with the event loop

9 years agoEvent backend porting
Manuel Nickschas [Tue, 5 Oct 2010 16:32:18 +0000 (18:32 +0200)]
Event backend porting

RPL_UMODEIS (221), RPL_STATSCONN (250), RPL_LOCALUSERS (265), RPL_GLOBALUSERS (266)

This were stubs in IrcServerHandler, they're supposed to update the network object.
I've ported the stubs so we'll actually implement that some day...

9 years agoEvent backend porting
Manuel Nickschas [Tue, 5 Oct 2010 16:23:53 +0000 (18:23 +0200)]
Event backend porting

AUTHENTICATE, CAP, PONG, TOPIC, RPL_WELCOME (001)

9 years agoMake sure IrcEventTopic always has two params
Manuel Nickschas [Tue, 5 Oct 2010 16:17:47 +0000 (18:17 +0200)]
Make sure IrcEventTopic always has two params

In case of an empty topic, adding a null string in the event saves us from
specialcasing this in a few places.

9 years agoEvent backend porting
Manuel Nickschas [Sun, 3 Oct 2010 22:02:58 +0000 (00:02 +0200)]
Event backend porting

INVITE, KICK, NICK, PART are using the event backend now.

9 years agoAdd checkParamCount() which stops the event if something's wrong
Manuel Nickschas [Thu, 30 Sep 2010 15:55:11 +0000 (17:55 +0200)]
Add checkParamCount() which stops the event if something's wrong

9 years agoDebug--
Manuel Nickschas [Thu, 30 Sep 2010 15:52:45 +0000 (17:52 +0200)]
Debug--

9 years agoPort IrcServerHandler::defaultHandler() to the event backend
Manuel Nickschas [Thu, 30 Sep 2010 07:37:33 +0000 (09:37 +0200)]
Port IrcServerHandler::defaultHandler() to the event backend

The killing has begun.

9 years agoAdd convenience functions for generating MessageEvents
Manuel Nickschas [Thu, 30 Sep 2010 07:36:05 +0000 (09:36 +0200)]
Add convenience functions for generating MessageEvents

Note that this displayMsg() takes different params than the old one. Also, the order
is now msg, sender, target instead of target, msg, sender, in order to avoid having to
specify an empty target for most calls.

9 years agoConvert null strings to empty strings
Manuel Nickschas [Thu, 30 Sep 2010 07:25:39 +0000 (09:25 +0200)]
Convert null strings to empty strings

The storage backend bails out when we hand over null strings, so convert those
to empty strings instead when transforming a MessageEvent into a Message. Null
strings are nicer to use and more efficient, so don't force people to avoid them
in the event handlers.

9 years agoChange the order of MessageEvent ctor params
Manuel Nickschas [Thu, 30 Sep 2010 07:23:49 +0000 (09:23 +0200)]
Change the order of MessageEvent ctor params

Be careful, params are specified in an order different from the old displayMsg(),
since it makes more sense like this and optimizes default arg use.

9 years agoMove EventStringifier from common/ to core/ for now
Manuel Nickschas [Tue, 28 Sep 2010 19:38:46 +0000 (21:38 +0200)]
Move EventStringifier from common/ to core/ for now

We need a way to access the EventManager, which currently works through CoreSession.

Once the stringifier moves into client, we'll use Client instead. Nothing else depends
on core.

9 years agoAdd skeletal EventStringifier
Manuel Nickschas [Tue, 28 Sep 2010 16:44:20 +0000 (18:44 +0200)]
Add skeletal EventStringifier

This class is supposed to generate the user-visible messages from IrcEvents,
i.e. it generates MessageEvents. For now, this lives in the CoreSession, which consumes
and converts the MessageEvents into the usual Messages that are then sent to the client.

In the future, this whole class should move into the client, in order to move string generation
out of the core. There's no need to store plaintext strings in the database if we can as well
simply store the IrcEvents, plus this will allow per-client translations.

9 years agoIntroduce event filters
Manuel Nickschas [Tue, 28 Sep 2010 16:37:14 +0000 (18:37 +0200)]
Introduce event filters

You can now register event filters, either by using registerObject() and providing methods
starting with "filter" (by default), similar to the process functions, or by using registerEventFilter().

These filter methods take an Event* and return a bool. If false, the event won't be delivered to the
target object at all. A typical use case would be to only accept events that are targeted to a particular
network and ignoring the rest, without having to check the net in each event handler.

Note that priority is ignored; for registerObject(), filters are added with the most specialized first,
and for registerEventFilter() you're responsible for the correct order.

9 years agoProperly handle numeric events
Manuel Nickschas [Tue, 28 Sep 2010 07:32:55 +0000 (09:32 +0200)]
Properly handle numeric events

9 years agoHook up the event system to CoreSession's legacy displayMsg() processing
Manuel Nickschas [Sat, 25 Sep 2010 15:38:24 +0000 (17:38 +0200)]
Hook up the event system to CoreSession's legacy displayMsg() processing

Now MessageEvents are handled the same way as displayMsg() calls, and we can start
gradually replacing the latter with the former.

9 years agoUse a queue for events
Manuel Nickschas [Sat, 25 Sep 2010 15:04:26 +0000 (17:04 +0200)]
Use a queue for events

Using a queue ensures that events will be processed in order, i.e. if processing
an events generates new ones, those won't be handled before the first one is fully done.
We also let Qt process its own QEvents in between, in order to not block things like
network handling.

9 years agoPrettify qDebug() output for events
Manuel Nickschas [Fri, 24 Sep 2010 17:27:28 +0000 (19:27 +0200)]
Prettify qDebug() output for events