mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:04:47 +02:00
BUILD : 1.7.0 (15) BUGS : N/A NOTES : Added the ability for modules to add Commands and Messages outside of AnopeInit()
git-svn-id: svn://svn.anope.org/anope/trunk@15 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@9 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
a97832683d
commit
6f9bbb2d39
@@ -1,6 +1,7 @@
|
||||
Anope Version 1.7.0
|
||||
--------------------
|
||||
Provided by Anope Dev. <dev@anope.org>
|
||||
2004/03/31 Modules can now add Commands/Messages from outside of AnopeInit
|
||||
2004/03/31 Fixed a bug with recersive module callbacks.
|
||||
2004/03/30 Added channelname to entrymsg
|
||||
2004/03/28 Fixed tables.sql and removed needless tables.
|
||||
|
||||
@@ -643,11 +643,18 @@ int moduleAddCommand(CommandHash * cmdTable[], Command * c, int pos)
|
||||
if (!cmdTable || !c) {
|
||||
return MOD_ERR_PARAMS;
|
||||
}
|
||||
/* ok, this appears to be a module adding a command from outside of AnopeInit, try to look up its module struct for it */
|
||||
if ((mod_current_module_name) && (!mod_current_module)) {
|
||||
mod_current_module = findModule(mod_current_module_name);
|
||||
}
|
||||
|
||||
if (!mod_current_module) {
|
||||
return MOD_ERR_UNKNOWN;
|
||||
} /* shouldnt happen */
|
||||
c->core = 0;
|
||||
c->mod_name = sstrdup(mod_current_module->name);
|
||||
if (!c->mod_name) {
|
||||
c->mod_name = sstrdup(mod_current_module->name);
|
||||
}
|
||||
|
||||
if (cmdTable == HOSTSERV) {
|
||||
c->service = sstrdup(s_HostServ);
|
||||
@@ -1072,11 +1079,19 @@ int moduleAddMessage(Message * m, int pos)
|
||||
if (!m) {
|
||||
return MOD_ERR_PARAMS;
|
||||
}
|
||||
|
||||
/* ok, this appears to be a module adding a message from outside of AnopeInit, try to look up its module struct for it */
|
||||
if ((mod_current_module_name) && (!mod_current_module)) {
|
||||
mod_current_module = findModule(mod_current_module_name);
|
||||
}
|
||||
|
||||
if (!mod_current_module) {
|
||||
return MOD_ERR_UNKNOWN;
|
||||
} /* shouldnt happen */
|
||||
m->core = 0;
|
||||
m->mod_name = sstrdup(mod_current_module->name);
|
||||
if (!m->mod_name) {
|
||||
m->mod_name = sstrdup(mod_current_module->name);
|
||||
}
|
||||
|
||||
status = addMessage(IRCD, m, pos);
|
||||
if (debug) {
|
||||
|
||||
+5
-1
@@ -8,11 +8,15 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="0"
|
||||
VERSION_BUILD="12"
|
||||
VERSION_BUILD="15"
|
||||
VERSION_EXTRA=""
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.0 (15)
|
||||
# BUGS : N/A
|
||||
# NOTES : Added the ability for modules to add Commands and Messages outside of AnopeInit()
|
||||
#
|
||||
# BUILD : 1.7.0 (12)
|
||||
# BUGS : 5
|
||||
# NOTES : Fixed a bug with module callbacks, this is a tiny fix, but will need to be merged with the 1.6.x series, as it can cause a segfault if a module attempts to use recersive callbacks.
|
||||
|
||||
Reference in New Issue
Block a user