Skip to content
Permalink
Browse files

Cleanup

  • Loading branch information...
vanosg committed Sep 17, 2019
1 parent cfd7ef8 commit 7d94a5b8e7cdbffab11e66e391b8444a1767cac5
Showing with 19 additions and 5 deletions.
  1. +3 −3 eggdrop.conf
  2. +16 −2 src/mod/server.mod/cmdsserv.c
@@ -1086,9 +1086,9 @@ set default-port 6667
# Prefix the port with a plus sign to attempt a SSL connection:
# addserver <server> +port [password]
#
# Both the port and password fields are optional; however, if you want to set a
# password or use SSL you must also set a port. If a port isn't specified it
# will default to your default-port setting.
# Both the port and password fields are optional. If a port isn't specified,
# the default-port setting will be used. If you want to set a password or use
# SSL, you must specify a port.
#
# This format is new as of version 1.9.0. The previous method using
# set servers {} will still work for now, but is deprecated and will be removed
@@ -24,9 +24,12 @@
static void cmd_servers(struct userrec *u, int idx, char *par)
{
struct server_list *x = serverlist;
time_t t;
struct tm currtm;
int i, len = 0;
char buf[16];
char s[1024];
char setpass[11];

putlog(LOG_CMDS, "*", "#%s# servers", dcc[idx].nick);
if (!x) {
@@ -50,12 +53,23 @@ static void cmd_servers(struct userrec *u, int idx, char *par)
#ifdef TLS
len += egg_snprintf(s+len, sizeof s - len, "%s", x->ssl ? "+" : "");
#endif
if (x->pass) {
t = time(NULL);
currtm = *localtime(&t); /* ******* */
if ((currtm.tm_mon == 3) && (currtm.tm_mday == 1)) {
strcpy(setpass, "(hunter2)");
} else {
strcpy(setpass, "(password)");
}
} else {
strcpy(setpass, "");
}
if ((i == curserv) && realservername) {
len += egg_snprintf(s+len, sizeof s - len, "%d (%s) <- I am here",
x->port ? x->port : default_port, realservername);
x->port ? x->port : default_port, setpass, realservername);
} else {
len += egg_snprintf(s+len, sizeof s - len, "%d %s",
x->port ? x->port : default_port,
x->port ? x->port : default_port, setpass,
(i == curserv) ? "<- I am here" : "");
}
dprintf(idx, "%s\n", s);

0 comments on commit 7d94a5b

Please sign in to comment.
You can’t perform that action at this time.