summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/servers.h4
-rw-r--r--src/commands.cpp10
-rw-r--r--src/servers.cpp2
3 files changed, 13 insertions, 3 deletions
diff --git a/include/servers.h b/include/servers.h
index ee4e7290b..09e6ad1c6 100644
--- a/include/servers.h
+++ b/include/servers.h
@@ -59,6 +59,10 @@ class serverrec : public connection
/** Description of the server
*/
char description[MAXBUF];
+
+ /** Holds nickserv's name on U:lined (services) servers (this is a kludge for ircservices which ASSUMES things :/)
+ */
+ char nickserv[NICKMAX];
bool sync_soon;
diff --git a/src/commands.cpp b/src/commands.cpp
index 3bea32563..0b9624ea8 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -2555,6 +2555,10 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve
snprintf(buffer,MAXBUF,"+ %s %s %d %d",tcp_host,ipaddr,port,authcookie);
NetSendToAllExcept(tcp_host,buffer);
break;
+ case '/':
+ WriteOpers("Server %s is IRCServices-based server (assumes-SVSMODE) - Nickname Services: %s",tcp_host,params);
+ strlcpy(source->nickserv,params,NICKMAX);
+ break;
// F <TS>
// end netburst with no mesh creation
case 'f':
@@ -2653,14 +2657,14 @@ void handle_link_packet(char* udp_msg, char* tcp_host, serverrec *serv)
}
if (!strcmp(command,"SVSMODE"))
{
- snprintf(udp_msg,MAXBUF,"M %s",data);
+ snprintf(udp_msg,MAXBUF,"m %s %s",source,data);
log(DEBUG,"Rewrote SVSMODE from services to: '%s'",udp_msg);
token = udp_msg[0];
}
if (!strcmp(command,"SVS2MODE"))
{
- snprintf(udp_msg,MAXBUF,"M %s",data);
- log(DEBUG,"Rewrote SVSMODE from services to: '%s'",udp_msg);
+ snprintf(udp_msg,MAXBUF,"m %s %s",source,data);
+ log(DEBUG,"Rewrote SVS2MODE from services to: '%s'",udp_msg);
token = udp_msg[0];
}
// todo: this wont work without u:lines
diff --git a/src/servers.cpp b/src/servers.cpp
index 2d1f70ed8..5bf694183 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -31,6 +31,7 @@ serverrec::serverrec()
jupiter = false;
fd = 0;
sync_soon = false;
+ strlcpy(nickserv,"",NICKMAX);
}
@@ -49,5 +50,6 @@ serverrec::serverrec(char* n, long ver, bool jupe)
jupiter = jupe;
fd = 0;
sync_soon = false;
+ strlcpy(nickserv,"",NICKMAX);
}