quick and dirty freenode connect fix
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,10 @@
-mcbot (0.93-2) unstable; urgency=low
+mcbot (0.93-3) unstable; urgency=low
* Initial Release
* the location of mcbot.cgi is stored in the db
* never include malloc, use stdlib instead
* mcbot.email and mcbot.user holds the admin information
* Locale Settings changed to C
+ * freenode connect fix
-- Markus Broeker <mbroeker@largo.homelinux.org> Sun, 27 Apr 2008 09:05:54 +0200
--- a/src/irc.c
+++ b/src/irc.c
@@ -103,6 +103,10 @@
break;
}
+ if (strstr (msg, ":You are now logged in.") != NULL) {
+ break;
+ }
+
if (strstr (msg, ":Password Incorrect") != NULL) {
return IRC_LOGIN_ERROR;
}
@@ -309,6 +313,11 @@
message->line = strtok (NULL, "\r\n");
return command;
break;
+ case 901: /* notify or some crap */
+ message->channel = strtok (message->line, " ");
+ message->line = strtok(NULL, "\r\n");
+ return command;
+ break;
default:
printf ("DEBUG %s", line);
printf ("Unknown Value: %d\n", value);