Skip to content
Browse files

This avoids your irc windows being filled with away stuff

Downside of antiidle is that because it messages yourself internally
the irc server will send messages to you when you're marked as away.
This can end up being really annoying, so those messages are blocked
with these changes.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
  • Loading branch information...
1 parent cf8db5e commit a6e5225e8a9af2933695af7174afa7c4f1a70eb1 @schoentoon schoentoon committed with psychon Sep 24, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 modules/extra/antiidle.cpp
View
12 modules/extra/antiidle.cpp
@@ -72,6 +72,18 @@ class CAntiIdle : public CModule
return CONTINUE;
}
+ virtual EModRet OnRaw(CString &sLine) {
+ /* If we send a message to ourselfs while we are away, this
+ * will result in the server sending a 301 which we shouldn't
+ * forward to the client */
+
+ if (sLine.Token(1).Equals("301") && sLine.Token(3).Equals(m_pUser->GetIRCNick().GetNick())) {
+ return HALT;
+ }
+
+ return CONTINUE;
+ }
+
private:
void SetInterval(int i)
{

0 comments on commit a6e5225

Please sign in to comment.
Something went wrong with that request. Please try again.