Skip to content
Permalink
Browse files

cleanup

  • Loading branch information...
vanosg committed Sep 17, 2019
1 parent e4d5fb1 commit d3d8bd660eb4c4737b67d8514653886e75860142
Showing with 11 additions and 11 deletions.
  1. +4 −4 src/mod/server.mod/cmdsserv.c
  2. +7 −7 src/mod/server.mod/server.c
@@ -26,7 +26,7 @@ static void cmd_servers(struct userrec *u, int idx, char *par)
{
struct server_list *x = serverlist;
time_t t;
struct tm currtm;
struct tm *currtm;
int i, len = 0;
char buf[16];
char s[1024];
@@ -58,12 +58,12 @@ static void cmd_servers(struct userrec *u, int idx, char *par)
t = time(NULL);
currtm = *localtime(&t); /* ******* */
if ((currtm.tm_mon == 3) && (currtm.tm_mday == 1)) {
strcpy(setpass, "(hunter2)");
strlcpy(setpass, "(hunter2)", sizeof setpass);
} else {
strcpy(setpass, "(password)");
strlcpy(setpass, "(password)", sizeof setpass);
}
} else {
strcpy(setpass, "");
strlcpy(setpass, "", sizeof setpass);
}
if ((i == curserv) && realservername) {
len += egg_snprintf(s+len, sizeof s - len, "%d (%s) <- I am here",
@@ -120,8 +120,8 @@ static int deq_kick(int);
static void msgq_clear(struct msgq_head *qh);
static int stack_limit;
static char *realservername;
static char add_server(const char *, const char *, const char *);
static char del_server(const char *, const char *);
static int add_server(const char *, const char *, const char *);
static int del_server(const char *, const char *);
static void free_server(struct server_list *);

static int sasl = 0;
@@ -984,9 +984,9 @@ static void queue_server(int which, char *msg, int len)
}


/* This will be removed in v2.0
It is used to split the 'old' server lists prior to sending to
the new add_server as of v1.9.0
/* This is used to split the 'old' server lists prior to sending to the new
add_server as of v1.9.0. It can be removed if the 'old' server method is
removed from Eggdrop.
*/
static void old_add_server(const char *ss) {
char name[121] = "";
@@ -1000,7 +1000,7 @@ static void old_add_server(const char *ss) {

/* Add a new server to the server_list.
*/
static char add_server(const char *name, const char *port, const char *pass)
static int add_server(const char *name, const char *port, const char *pass)
{
struct server_list *x, *z;
char *ret;
@@ -1048,7 +1048,7 @@ static char add_server(const char *name, const char *port, const char *pass)
* Checks based on IP and then the port, if one is provided. If no port is
* provided, remove only the first matching host.
*/
static char del_server(const char *name, const char *port)
static int del_server(const char *name, const char *port)
{
struct server_list *z, *curr, *prev;
char *ret;

0 comments on commit d3d8bd6

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