summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-10 12:55:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-10 12:55:53 +0000
commit6825da4bbfde5c78f4340139737cb2c7f2e91781 (patch)
tree526be3622e16f96bbaf90c7fefda3d64f775d2d7 /src
parent8d5014fcf09d1ff675ca730d3a049cccd1af7e9b (diff)
Added some logging to 'T' datagram handler
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@490 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index d4ed5042b..ba520be42 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -5351,18 +5351,23 @@ void DoSync(serverrec* serv, char* udp_host,int udp_port, long MyKey)
void handle_T(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port)
{
char* tm = strtok(params," ");
- char* setnick = strtok(NULL," ");
+ char* setby = strtok(NULL," ");
char* channel = strtok(NULL," :");
char* topic = strtok(NULL,"\r\n");
topic++;
time_t TS = atoi(tm);
chanrec* c = FindChan(channel);
+ log(DEBUG,"time='%d' setby='%s' channel='%s' topic='%s'",TS,setby,channel,topic);
if (c)
{
+ log(DEBUG,"channel found");
+ // in the case of topics and TS, the *NEWER*
if (TS <= c->age)
{
+ log(DEBUG,"channel TS higher, replacing");
WriteChannelLocal(c,NULL,"TOPIC %s :%s",c->name,topic);
strncpy(c->topic,topic,MAXTOPIC);
+ strncpy(c->setby,setnick,NICKMAX);
}
}
}
@@ -5439,7 +5444,8 @@ void handle_N(char token,char* params,serverrec* source,serverrec* reply, char*
void handle_F(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port)
{
long tdiff = time(NULL) - atoi(params);
- WriteOpers("TS split for %s -> %s: %d",source->name,reply->name,tdiff);
+ if (tdiff)
+ WriteOpers("TS split for %s -> %s: %d",source->name,reply->name,tdiff);
}
void handle_J(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port)