/[cvs]/eggdrop1.8/src/botmsg.c
ViewVC logotype

Diff of /eggdrop1.8/src/botmsg.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.1.1 by simple, Mon Jul 26 21:11:06 2010 UTC revision 1.1.1.1.2.1 by pseudo, Wed Nov 10 13:39:19 2010 UTC
# Line 398  void botnet_send_nlinked(int idx, char * Line 398  void botnet_send_nlinked(int idx, char *
398  #ifndef NO_OLD_BOTNET  #ifndef NO_OLD_BOTNET
399      if (flag == '!') {      if (flag == '!') {
400        flag = '-';        flag = '-';
401        tandout_but(idx, "chat %s %s %s\n", next, NET_LINKEDTO, bot);        tandout_but(idx, "chat %s %s %s\n", next, _("Linked to"), bot);
402      }      }
403      tandout_but(idx, "nlinked %s %s %c%d\n", bot, next, flag, vernum);      tandout_but(idx, "nlinked %s %s %c%d\n", bot, next, flag, vernum);
404  #endif  #endif
# Line 585  void botnet_send_away(int idx, char *bot Line 585  void botnet_send_away(int idx, char *bot
585          if (partyidx >= 0)          if (partyidx >= 0)
586            tandout_but(idx, "chan %s %d %s %s: %s.\n", bot,            tandout_but(idx, "chan %s %d %s %s: %s.\n", bot,
587                        party[partyidx].chan, party[partyidx].nick,                        party[partyidx].chan, party[partyidx].nick,
588                        NET_AWAY, msg);                        _("is now away"), msg);
589        }        }
590        tandout_but(idx, "away %s %d %s\n", bot, sock, msg);        tandout_but(idx, "away %s %d %s\n", bot, sock, msg);
591      } else {      } else {
592        if (idx < 0) {        if (idx < 0) {
593          tandout_but(idx, "chan %s %d %s %s.\n", bot,          tandout_but(idx, "chan %s %d %s %s.\n", bot,
594                      dcc[linking].u.chat->channel, dcc[linking].nick,                      dcc[linking].u.chat->channel, dcc[linking].nick,
595                      NET_UNAWAY);                      _("is no longer away"));
596        } else if (b_numver(idx) >= NEAT_BOTNET) {        } else if (b_numver(idx) >= NEAT_BOTNET) {
597          int partyidx = getparty(bot, sock);          int partyidx = getparty(bot, sock);
598    
599          if (partyidx >= 0)          if (partyidx >= 0)
600            tandout_but(idx, "chan %s %d %s %s.\n", bot,            tandout_but(idx, "chan %s %d %s %s.\n", bot,
601                        party[partyidx].chan, party[partyidx].nick, NET_UNAWAY);                        party[partyidx].chan, party[partyidx].nick, _("is no longer away"));
602        }        }
603        tandout_but(idx, "unaway %s %d\n", bot, sock);        tandout_but(idx, "unaway %s %d\n", bot, sock);
604      }      }
# Line 622  void botnet_send_join_idx(int useridx, i Line 622  void botnet_send_join_idx(int useridx, i
622                  geticon(useridx), dcc[useridx].sock, dcc[useridx].host);                  geticon(useridx), dcc[useridx].sock, dcc[useridx].host);
623      tandout_but(-1, "chan %s %d %s %s %s.\n",      tandout_but(-1, "chan %s %d %s %s %s.\n",
624                  botnetnick, dcc[useridx].u.chat->channel,                  botnetnick, dcc[useridx].u.chat->channel,
625                  dcc[useridx].nick, NET_JOINEDTHE,                  dcc[useridx].nick, _("has joined the"),
626                  dcc[useridx].u.chat->channel ? "channel" : "party line");                  dcc[useridx].u.chat->channel ? "channel" : "party line");
627      if ((oldchan >= 0) && (oldchan < GLOBAL_CHANS)) {      if ((oldchan >= 0) && (oldchan < GLOBAL_CHANS)) {
628        tandout_but(-1, "chan %s %d %s %s %s.\n",        tandout_but(-1, "chan %s %d %s %s.\n", botnetnick, oldchan,
629                    botnetnick, oldchan,                    dcc[useridx].nick, oldchan ? _("has left the channel)") :
630                    dcc[useridx].nick, NET_LEFTTHE,                    _("has left the party line"));
                   oldchan ? "channel" : "party line");  
631      }      }
632  #endif  #endif
633    }    }
# Line 651  void botnet_send_join_party(int idx, int Line 650  void botnet_send_join_party(int idx, int
650                  party[useridx].flag, party[useridx].sock,                  party[useridx].flag, party[useridx].sock,
651                  party[useridx].from ? party[useridx].from : "");                  party[useridx].from ? party[useridx].from : "");
652      if ((idx < 0) || (!linking && (b_numver(idx) >= NEAT_BOTNET))) {      if ((idx < 0) || (!linking && (b_numver(idx) >= NEAT_BOTNET))) {
653        tandout_but(idx, "chan %s %d %s %s %s.\n",        tandout_but(idx, "chan %s %d %s %s.\n", party[useridx].bot,
654                    party[useridx].bot, party[useridx].chan,                    party[useridx].chan, party[useridx].nick,
655                    party[useridx].nick, NET_JOINEDTHE,                    party[useridx].chan ? _("has joined the channel") :
656                    party[useridx].chan ? "channel" : "party line");                    _("has joined the party line"));
657      }      }
658      if ((oldchan >= 0) && (oldchan < GLOBAL_CHANS) &&      if ((oldchan >= 0) && (oldchan < GLOBAL_CHANS) &&
659          ((idx < 0) || (b_numver(idx) >= NEAT_BOTNET))) {          ((idx < 0) || (b_numver(idx) >= NEAT_BOTNET))) {
660        tandout_but(idx, "chan %s %d %s %s %s.\n",        tandout_but(idx, "chan %s %d %s %s.\n", party[useridx].bot, oldchan,
661                    party[useridx].bot, oldchan, party[useridx].nick,                    party[useridx].nick, party[useridx].chan ?
662                    NET_LEFTTHE, party[useridx].chan ? "channel" : "party line");                    _("has left the channel") : _("has left the party line"));
663      }      }
664  #endif  #endif
665    }    }
# Line 726  void botnet_send_nkch(int useridx, char Line 725  void botnet_send_nkch(int useridx, char
725                  geticon(useridx), dcc[useridx].sock, dcc[useridx].host);                  geticon(useridx), dcc[useridx].sock, dcc[useridx].host);
726      tandout_but(-1, "chan %s %d %s: %s -> %s.\n",      tandout_but(-1, "chan %s %d %s: %s -> %s.\n",
727                  botnetnick, dcc[useridx].u.chat->channel,                  botnetnick, dcc[useridx].u.chat->channel,
728                  oldnick, NET_NICKCHANGE, dcc[useridx].nick);                  oldnick, _("Nick Change:"), dcc[useridx].nick);
729  #endif  #endif
730    }    }
731  }  }
# Line 748  void botnet_send_nkch_part(int butidx, i Line 747  void botnet_send_nkch_part(int butidx, i
747                  party[useridx].from ? party[useridx].from : "");                  party[useridx].from ? party[useridx].from : "");
748      tandout_but(butidx, "chan %s %d %s : %s -> %s.\n",      tandout_but(butidx, "chan %s %d %s : %s -> %s.\n",
749                  party[useridx].bot, party[useridx].chan,                  party[useridx].bot, party[useridx].chan,
750                  NET_NICKCHANGE, oldnick, party[useridx].nick);                  _("Nick Change:"), oldnick, party[useridx].nick);
751  #endif  #endif
752    }    }
753  }  }
# Line 799  int add_note(char *to, char *from, char Line 798  int add_note(char *to, char *from, char
798      i = nextbot(p);      i = nextbot(p);
799      if (i < 0) {      if (i < 0) {
800        if (idx >= 0)        if (idx >= 0)
801          dprintf(idx, BOT_NOTHERE);          dprintf(idx, _("That bot isn't here.\n"));
802    
803        return NOTE_ERROR;        return NOTE_ERROR;
804      }      }
# Line 840  int add_note(char *to, char *from, char Line 839  int add_note(char *to, char *from, char
839    u = get_user_by_handle(userlist, to);    u = get_user_by_handle(userlist, to);
840    if (!u) {    if (!u) {
841      if (idx >= 0)      if (idx >= 0)
842        dprintf(idx, USERF_UNKNOWN);        dprintf(idx, _("I don't know anyone by that name.\n"));
843    
844      return NOTE_ERROR;      return NOTE_ERROR;
845    }    }
# Line 848  int add_note(char *to, char *from, char Line 847  int add_note(char *to, char *from, char
847    /* Is the note to a bot? */    /* Is the note to a bot? */
848    if (is_bot(u)) {    if (is_bot(u)) {
849      if (idx >= 0)      if (idx >= 0)
850        dprintf(idx, BOT_NONOTES);        dprintf(idx, _("That's a bot.  You can't leave notes for a bot.\n"));
851    
852      return NOTE_ERROR;      return NOTE_ERROR;
853    }    }
# Line 856  int add_note(char *to, char *from, char Line 855  int add_note(char *to, char *from, char
855    /* Is user rejecting notes from this source? */    /* Is user rejecting notes from this source? */
856    if (match_noterej(u, from)) {    if (match_noterej(u, from)) {
857      if (idx >= 0)      if (idx >= 0)
858        dprintf(idx, "%s rejected your note.\n", u->handle);        dprintf(idx, _("%s rejected your note.\n"), u->handle);
859    
860      return NOTE_REJECT;      return NOTE_REJECT;
861    }    }
# Line 878  int add_note(char *to, char *from, char Line 877  int add_note(char *to, char *from, char
877            aok = 0;            aok = 0;
878    
879            if (idx >= 0)            if (idx >= 0)
880              dprintf(idx, "%s %s: %s\n", dcc[i].nick, BOT_USERAWAY,              dprintf(idx, _("%s is away: %s\n"), dcc[i].nick,
881                      dcc[i].u.chat->away);                      dcc[i].u.chat->away);
882    
883            if (!iaway)            if (!iaway)
# Line 903  int add_note(char *to, char *from, char Line 902  int add_note(char *to, char *from, char
902          if (idx == -2 || !egg_strcasecmp(from, botnetnick))          if (idx == -2 || !egg_strcasecmp(from, botnetnick))
903            dprintf(i, "*** [%s] %s%s\n", fr, l ? work : "", msg);            dprintf(i, "*** [%s] %s%s\n", fr, l ? work : "", msg);
904          else          else
905            dprintf(i, "%cNote [%s]: %s%s\n", 7, fr, l ? work : "", msg);            dprintf(i, _("%cNote [%s]: %s%s\n"), 7, fr, l ? work : "", msg);
906    
907          if (idx >= 0 && echo)          if (idx >= 0 && echo)
908            dprintf(idx, "-> %s: %s\n", to, msg);            dprintf(idx, "-> %s: %s\n", to, msg);
# Line 932  int add_note(char *to, char *from, char Line 931  int add_note(char *to, char *from, char
931       * message arrived and was stored (only oldest session is notified).       * message arrived and was stored (only oldest session is notified).
932       */       */
933      if (status == NOTE_AWAY)      if (status == NOTE_AWAY)
934        dprintf(iaway, "*** %s.\n", BOT_NOTEARRIVED);        dprintf(iaway, _("*** Note arrived for you.\n"));
935    
936      return status;      return status;
937    }    }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.2.1

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23