summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-03-24 18:07:52 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-03-24 18:07:52 +0000
commitca049db71a518655e7c3bfe0f0d8a057ec88c8bb (patch)
tree4cdbc142b8cf99b4e93f349cce8a5e85ce357291
parent454c039711783c6226818b71d18a2ab936c9082d (diff)
Fixed a ton of MODE crap 'avec le' services :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@896 e03df62e-2008-0410-955e-edbf42e46eb7
-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);
}