summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 16:56:24 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 16:56:24 +0000
commitb496e60eb0d18fd4608bf2f75cacfbb994d4a40a (patch)
tree73943842c4feb804005e684c53d32a106b1acdde
parent2bf017a0e1f18a7609908a1c925f60d0fd92e26d (diff)
Fix compile errors in hs_* modules, as well as add some const-safeness to HostServ functions.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1980 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--include/extern.h10
-rw-r--r--src/core/hs_del.c2
-rw-r--r--src/core/hs_delall.c4
-rw-r--r--src/core/hs_set.c2
-rw-r--r--src/core/hs_setall.c2
-rw-r--r--src/hostserv.c10
6 files changed, 15 insertions, 15 deletions
diff --git a/include/extern.h b/include/extern.h
index 124afccff..e99832823 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -254,7 +254,7 @@ E char *s_HostServ;
E void load_hs_dbase();
E void save_hs_dbase();
E int do_on_id(User * u);
-E void delHostCore(char *nick);
+E void delHostCore(const char *nick);
E void hostserv(User * u, char *buf);
E char *PIDFilename;
@@ -478,15 +478,15 @@ E void helpserv_init();
/**** hostserv.c ****/
E void get_hostserv_stats(long *nrec, long *memuse);
E void hostserv_init();
-E void addHostCore(char *nick, char *vIdent, char *vhost, const char *creator, int32 tmp_time);
+E void addHostCore(const char *nick, char *vIdent, char *vhost, const char *creator, int32 tmp_time);
E char *getvIdent(char *nick);
E char *getvHost(char *nick);
E int is_host_remover(User * u);
E int is_host_setter(User *u);
E HostCore *hostCoreListHead();
-E HostCore *findHostCore(HostCore * head, char *nick, bool *found);
-E HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
-E HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
+E HostCore *findHostCore(HostCore * head, const char *nick, bool *found);
+E HostCore *createHostCorelist(HostCore * next, const char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
+E HostCore *insertHostCore(HostCore * head, HostCore * prev, const char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
E HostCore *deleteHostCore(HostCore * head, HostCore * prev);
E void set_lastmask(User * u);
diff --git a/src/core/hs_del.c b/src/core/hs_del.c
index 15f218088..1057a4d5e 100644
--- a/src/core/hs_del.c
+++ b/src/core/hs_del.c
@@ -55,7 +55,7 @@ class CommandHSDel : public Command
void OnSyntaxError(User *u)
{
- syntax_error(s_HostServ, u, "DEL", HOST_DEL_SYNTAX, s_HostServ);
+ syntax_error(s_HostServ, u, "DEL", HOST_DEL_SYNTAX);
}
};
diff --git a/src/core/hs_delall.c b/src/core/hs_delall.c
index 5976100d2..2c749f2a2 100644
--- a/src/core/hs_delall.c
+++ b/src/core/hs_delall.c
@@ -56,13 +56,13 @@ class CommandHSDelAll : public Command
if (!is_host_remover(u))
return false;
- notice_lang(s_HostServ, u, HOST_HELP_ALL);
+ notice_lang(s_HostServ, u, HOST_HELP_DELALL);
return true;
}
void OnSyntaxError(User *u)
{
- syntax_error(s_HostServ, u, "DELALL", HOST_DELALL_SYNTAX, s_HostServ);
+ syntax_error(s_HostServ, u, "DELALL", HOST_DELALL_SYNTAX);
}
};
diff --git a/src/core/hs_set.c b/src/core/hs_set.c
index 10a717ae5..6364086ce 100644
--- a/src/core/hs_set.c
+++ b/src/core/hs_set.c
@@ -152,7 +152,7 @@ class CommandHSSet : public Command
void OnSyntaxError(User *u)
{
- syntax_error(s_HostServ, u, "SET", HOST_SET_SYNTAX, s_HostServ);
+ syntax_error(s_HostServ, u, "SET", HOST_SET_SYNTAX);
}
};
diff --git a/src/core/hs_setall.c b/src/core/hs_setall.c
index df069101e..2567126fe 100644
--- a/src/core/hs_setall.c
+++ b/src/core/hs_setall.c
@@ -152,7 +152,7 @@ class CommandHSSetAll : public Command
void OnSyntaxError(User *u)
{
- syntax_error(s_HostServ, u, "SETALL", HOST_SETALL_SYNTAX, s_HostServ);
+ syntax_error(s_HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
}
};
diff --git a/src/hostserv.c b/src/hostserv.c
index 07bf7c976..7d2ba950c 100644
--- a/src/hostserv.c
+++ b/src/hostserv.c
@@ -125,7 +125,7 @@ HostCore *hostCoreListHead()
* @param time Time the vhost was Set
* @return HostCore
*/
-HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
+HostCore *createHostCorelist(HostCore * next, const char *nick, char *vIdent,
char *vHost, const char *creator, int32 tmp_time)
{
@@ -174,7 +174,7 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent,
* @param found If found
* @return HostCore
*/
-HostCore *findHostCore(HostCore * phead, char *nick, bool* found)
+HostCore *findHostCore(HostCore * phead, const char *nick, bool* found)
{
HostCore *previous, *current;
@@ -206,7 +206,7 @@ HostCore *findHostCore(HostCore * phead, char *nick, bool* found)
}
/*************************************************************************/
-HostCore *insertHostCore(HostCore * phead, HostCore * prev, char *nick,
+HostCore *insertHostCore(HostCore * phead, HostCore * prev, const char *nick,
char *vIdent, char *vHost, const char *creator,
int32 tmp_time)
{
@@ -285,7 +285,7 @@ HostCore *deleteHostCore(HostCore * phead, HostCore * prev)
}
/*************************************************************************/
-void addHostCore(char *nick, char *vIdent, char *vhost, const char *creator,
+void addHostCore(const char *nick, char *vIdent, char *vhost, const char *creator,
int32 tmp_time)
{
HostCore *tmp;
@@ -339,7 +339,7 @@ char *getvIdent(char *nick)
}
/*************************************************************************/
-void delHostCore(char *nick)
+void delHostCore(const char *nick)
{
HostCore *tmp;
bool found = false;