Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bot reporting about bot-/user-only ports #1438

Merged
merged 3 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions language/core.danish.lang
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,5 @@ Telnet botten og skriv 'NEW' som dit nick.\n
0xe33,Mistede telnet forbindelse fra %s mens der blev tjekket for dubletter
0xe34,TIMEOUT ident forbindelse
0xe35,Please remove the #comment from your listen setting and try again
0xe36,This port is for bots only
0xe37,This port is for users only (no bots)
2 changes: 2 additions & 0 deletions language/core.english.lang
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,5 @@ Telnet to the bot and enter 'NEW' as your handle.
0xe33,Lost telnet connection from %s while checking for duplicate
0xe34,TIMEOUT ident connection
0xe35,Please remove the #comment from your listen setting and try again
0xe36,This port is for bots only
0xe37,This port is for users only (no bots)
2 changes: 2 additions & 0 deletions language/core.finnish.lang
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,5 @@ Telnettaa botille ja sy
0xe33,Telnet yhteys hukattu %s sill�aikaa kun tarkistettiin tuplausta
0xe34,Kadotettu ident yhteys
0xe35,Please remove the #comment from your listen setting and try again
0xe36,This port is for bots only
0xe37,This port is for users only (no bots)
2 changes: 2 additions & 0 deletions language/core.french.lang
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,5 @@ Faites un Telnet sur le bot et entrez 'NEW' comme surnom.
0xe33,Connexion telnet de %s perdue pendant la v�rification des doublons
0xe34,Timeout ident connection
0xe35,Please remove the #comment from your listen setting and try again
0xe36,Ce port est r�serv� aux bots
0xe37,Ce port est r�serv� aux utilisateurs (pas de bots)
4 changes: 3 additions & 1 deletion language/core.german.lang
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Baue eine Telnetverbindung zu dem Bot auf und gib 'NEW' als Deinen Nickname ein.
0x90b,Missbrauch eines Desync
0x90c,Flood

0xa00,keine ignorierten User
0xa00,keine ignorierten Benutzer
0xa01,Im Moment werden ignoriert
0xa02,Ignoriere nicht mehr

Expand Down Expand Up @@ -439,3 +439,5 @@ Baue eine Telnetverbindung zu dem Bot auf und gib 'NEW' als Deinen Nickname ein.
0xe33,Telnet-Verbindung von %s waerend Kontrolle auf Duplikat verloren
0xe34,Zeitueberschreitung bei der Ident-Verbindung
0xe35,Bitte entferne den #Kommentar im listen-Befehl und versuche es erneut
0xe36,Dieser Port ist nur fuer Bots
0xe37,Dieser Port ist nur fuer Benutzer (keine Bots)
2 changes: 2 additions & 0 deletions language/core.italian.lang
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,5 @@ Connetti in telnet il bot e scrivi 'NEW' come tuo soprannome.
0xe33,Connessione telnet persa da %s mentre controllo se è un duplicato
0xe34,Connessione ident fuori tempo
0xe35,Per favore togli il #commento dalle tue impostazione di ascolto e riprova
0xe36,Questa porta è solo per bot
0xe37,Questa porta è solo per utenti (non bot)
2 changes: 2 additions & 0 deletions language/core.portuguese.lang
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,5 @@ Entre em ligação telnet com o bot e digite 'NEW' como o seu nick.
0xe33,Perdida ligação telnet de %s aquando verificação de duplicados
0xe34,Timeout em ligação de identificação
0xe35,Por favor, remova o #comentário na configuração de listen e tente novamente
0xe36,Esta porta é apenas para bots
0xe37,Esta porta é apenas para utilizadores (sem bots)
17 changes: 13 additions & 4 deletions src/dcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,16 +1578,24 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
#endif
/* Make sure users-only/bots-only connects are honored */
if ((dcc[idx].status & STAT_BOTONLY) && !glob_bot(fr)) {
dprintf(idx, "This telnet port is for bots only.\n");
putlog(LOG_BOTS, "*", DCC_NONBOT, dcc[idx].host);
if (dcc[idx].user) {
dprintf(idx, "%s\n", DCC_NONBOT2);
putlog(LOG_BOTS, "*", DCC_NONBOT, dcc[idx].host);
}
else {
if (!stealth_telnets) {
dprintf(idx, "You don't have access.\n");
}
putlog(LOG_MISC, "*", DCC_INVHANDLE, dcc[idx].host, buf);
}
killsock(dcc[idx].sock);
lostdcc(idx);
return;
}
if ((dcc[idx].status & STAT_USRONLY) && glob_bot(fr)) {
/* change here temp to use bot output */
dcc[idx].type = &DCC_BOT_NEW;
dprintf(idx, "error Only users may connect at this port.\n");
dprintf(idx, "%s\n", DCC_NONUSER2);
dcc[idx].type = old;
putlog(LOG_BOTS, "*", DCC_NONUSER, dcc[idx].host);
killsock(dcc[idx].sock);
Expand All @@ -1612,7 +1620,8 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
ok = 1;

if (!ok) {
dprintf(idx, "You don't have access.\n");
if (!stealth_telnets)
dprintf(idx, "You don't have access.\n");
putlog(LOG_MISC, "*", DCC_INVHANDLE, dcc[idx].host, buf);
killsock(dcc[idx].sock);
lostdcc(idx);
Expand Down
2 changes: 2 additions & 0 deletions src/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,5 +490,7 @@
#define DCC_LOSTDUP get_language(0xe33)
#define DCC_TIMEOUTIDENT get_language(0xe34)
#define DCC_BADLISTEN get_language(0xe35)
#define DCC_NONBOT2 get_language(0xe36)
#define DCC_NONUSER2 get_language(0xe37)

#endif /* _EGG_LANG_H */