--- a/src/parse.c
+++ b/src/parse.c
@@ -85,8 +85,8 @@
*/
if (message->user == NULL)
message->user = "error";
- if (message->email == NULL)
- message->email = "server.err";
+ if (message->domain == NULL)
+ message->domain = "server.err";
/*
* default message
@@ -123,7 +123,7 @@
case JOIN:
if ((token = strtok (NULL, "\r\n")))
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "JOIN %s\r\n", token);
}
return msg;
@@ -132,7 +132,7 @@
if (*message->channel != '#')
return NULL;
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "PART %s :Leaving.\r\n", message->channel);
}
return msg;
@@ -209,8 +209,8 @@
return msg;
case DEBUG:
- snprintf (msg, sizeof (msg), "PRIVMSG %s :USER: %s EMAIL: %s CHANNEL: %s LINE: %s\r\n",
- message->channel, message->user, message->email, message->channel, message->line);
+ snprintf (msg, sizeof (msg), "PRIVMSG %s :USER: %s domain: %s CHANNEL: %s LINE: %s\r\n",
+ message->channel, message->user, message->domain, message->channel, message->line);
return msg;
case VACCUUM:
@@ -219,7 +219,7 @@
case LOGOUT:
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email"))) {
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain"))) {
snprintf (msg, sizeof (msg), "PRIVMSG %s :%s!\r\nQUIT\r\n", message->channel,
gettext ("Bye, have a nice day!"));
}
@@ -266,7 +266,7 @@
case OP:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "MODE %s +o %s\r\n", message->channel, token);
}
}
@@ -275,7 +275,7 @@
case DEOP:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "MODE %s -o %s\r\n", message->channel, token);
}
}
@@ -284,7 +284,7 @@
case KICK:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "KICK %s %s\r\n", message->channel, token);
}
}
@@ -293,7 +293,7 @@
case BAN:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "MODE %s +b %s\r\n", message->channel, token);
}
}
@@ -302,7 +302,7 @@
case UNBAN:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "MODE %s -b %s\r\n", message->channel, token);
}
}
@@ -311,7 +311,7 @@
case KICKBAN:
if ((token = strtok (NULL, "\r\n")) != NULL) {
if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
- if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email")))
+ if (strstr (message->domain, db_lookup (DATABASE_FILE, "mcbot.domain")))
snprintf (msg, sizeof (msg), "MODE %s +b %s\r\nKICK %s %s\r\n", message->channel, token,
message->channel, token);
}