Bladeren bron

* Removed some COMPAT code

svn: 1036
Bryan Drewery 22 jaren geleden
bovenliggende
commit
05ab34cdbb
4 gewijzigde bestanden met toevoegingen van 2 en 46 verwijderingen
  1. 1 19
      src/botcmd.c
  2. 0 15
      src/botnet.c
  3. 0 1
      src/botnet.h
  4. 1 11
      src/mod/server.mod/servmsg.c

+ 1 - 19
src/botcmd.c

@@ -60,11 +60,6 @@ int base64_to_int(char *buf)
   return i;
 }
 
-/* Used for 1.0 compatibility: if a join message arrives with no sock#,
- * i'll just grab the next "fakesock" # (incrementing to assure uniqueness)
- */
-static int fakesock = 2300;
-
 static void fake_alert(int idx, char *item, char *extra)
 {
   static unsigned long lastfake;	/* The last time fake_alert was used */
@@ -1097,14 +1092,6 @@ static void bot_join(int idx, char *par)
   } else {
     sock = base64_to_int(y + 1);
   }
-  /* 1.1 bots always send a sock#, even on a channel change
-   * so if sock# is 0, this is from an old bot and we must tread softly
-   * grab old sock# if there is one, otherwise make up one.
-   */
-  if (sock == 0)
-    sock = partysock(bot, nick);
-  if (sock == 0)
-    sock = fakesock++;
   i = nextbot(bot);
   if (i != idx) {		/* Ok, garbage from a 1.0g (who uses that
 				 * now?) OR raistlin being evil :) */
@@ -1144,8 +1131,7 @@ static void bot_part(int idx, char *par)
   nick = newsplit(&par);
   etc = newsplit(&par);
   sock = base64_to_int(etc);
-  if (sock == 0)
-    sock = partysock(bot, nick);
+
   u = get_user_by_handle(userlist, nick);
   if (u) {
     sprintf(TBUF, "@%s", bot);
@@ -1187,8 +1173,6 @@ static void bot_away(int idx, char *par)
   }
   etc = newsplit(&par);
   sock = base64_to_int(etc);
-  if (sock == 0)
-    sock = partysock(bot, etc);
   check_bind_away(bot, idx, par);
   if (par[0]) {
     partystat(bot, sock, PLSTAT_AWAY, 0);
@@ -1221,8 +1205,6 @@ static void bot_idle(int idx, char *par)
   bot = newsplit(&par);
   work = newsplit(&par);
   sock = base64_to_int(work);
-  if (sock == 0)
-    sock = partysock(bot, work);
   work = newsplit(&par);
   idle = base64_to_int(work);
   partysetidle(bot, sock, idle);

+ 0 - 15
src/botnet.c

@@ -118,21 +118,6 @@ void updatebot(int idx, char *who, char share, int vlocalhub, time_t vbuildts, c
   }
 }
 
-/* For backward 1.0 compatibility:
- * grab the (first) sock# for a user on another bot
- */
-int partysock(char *bot, char *nick)
-{
-  int i;
-
-  for (i = 0; i < parties; i++) {
-    if ((!egg_strcasecmp(party[i].bot, bot)) &&
-	(!egg_strcasecmp(party[i].nick, nick)))
-      return party[i].sock;
-  }
-  return 0;
-}
-
 /* New botnet member
  */
 int addparty(char *bot, char *nick, int chan, char flag, int sock,

+ 0 - 1
src/botnet.h

@@ -30,7 +30,6 @@ void rembot(const char *);
 struct tand_t_struct *findbot(char *);
 void unvia(int, struct tand_t_struct *);
 void check_botnet_pings();
-int partysock(char *, char *);
 int addparty(char *, char *, int, char, int, char *, int *);
 void remparty(char *, int);
 void partystat(char *, int, int, int);

+ 1 - 11
src/mod/server.mod/servmsg.c

@@ -623,18 +623,8 @@ static int gotnotice(char *from, char *msg)
  */
 static int gotwall(char *from, char *msg)
 {
-  char *nick = NULL;
-
   fixcolon(msg);
-
-  /* Following is not needed at all, but we'll keep it for compatibility sak$
-   * so not to confuse possible scripts that are parsing log files.
-   */
-  if (strchr(from, '!')) {
-    nick = splitnick(&from);
-    putlog(LOG_WALL, "*", "!%s(%s)! %s", nick, from, msg);
-  } else
-    putlog(LOG_WALL, "*", "!%s! %s", from, msg);
+  putlog(LOG_WALL, "*", "!%s! %s", from, msg);
   return 0;
 }