projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show IRC server error messages when unexpected
[quassel.git]
/
src
/
core
/
eventstringifier.cpp
diff --git
a/src/core/eventstringifier.cpp
b/src/core/eventstringifier.cpp
index
787bac5
..
66f0e27
100644
(file)
--- a/
src/core/eventstringifier.cpp
+++ b/
src/core/eventstringifier.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
3
by the Quassel Project *
+ * Copyright (C) 2005-201
5
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-104,6
+104,10
@@
void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e)
case 253:
case 254:
case 255:
case 253:
case 254:
case 255:
+ case 256:
+ case 257:
+ case 258:
+ case 259:
case 265:
case 266:
case 372:
case 265:
case 266:
case 372:
@@
-112,6
+116,7
@@
void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e)
break;
// Server error messages without param, just display them
break;
// Server error messages without param, just display them
+ case 263:
case 409:
case 411:
case 412:
case 409:
case 411:
case 412:
@@
-337,6
+342,15
@@
void EventStringifier::processIrcEventTopic(IrcEvent *e)
.arg(e->nick(), e->params().at(0), e->params().at(1)), QString(), e->params().at(0));
}
.arg(e->nick(), e->params().at(0), e->params().at(1)), QString(), e->params().at(0));
}
+void EventStringifier::processIrcEventError(IrcEvent *e)
+{
+ // Need an error reason
+ if (!checkParamCount(e, 1))
+ return;
+
+ displayMsg(e, Message::Server, tr("Error from server: ") + e->params().join(""));
+}
+
void EventStringifier::processIrcEventWallops(IrcEvent *e)
{
displayMsg(e, Message::Server, tr("[Operwall] %1: %2").arg(e->nick(), e->params().join(" ")));
void EventStringifier::processIrcEventWallops(IrcEvent *e)
{
displayMsg(e, Message::Server, tr("[Operwall] %1: %2").arg(e->nick(), e->params().join(" ")));
@@
-728,7
+742,7
@@
void EventStringifier::handleCtcpPing(CtcpEvent *e)
if (e->ctcpType() == CtcpEvent::Query)
defaultHandler(e->ctcpCmd(), e);
else {
if (e->ctcpType() == CtcpEvent::Query)
defaultHandler(e->ctcpCmd(), e);
else {
- displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2 seconds round trip time")
- .arg(nickFromMask(e->prefix())).arg(QDateTime::from
Time_t(e->param().toInt()).
secsTo(e->timestamp())));
+ displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2
milli
seconds round trip time")
+ .arg(nickFromMask(e->prefix())).arg(QDateTime::from
MSecsSinceEpoch(e->param().toULongLong()).m
secsTo(e->timestamp())));
}
}
}
}