summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-25 14:29:50 -0400
committerAdam <Adam@anope.org>2012-04-25 14:29:50 -0400
commit1081ecdae80d10bcac0f8543d665c5579f271e61 (patch)
tree7b2665bc103c7306b2ec08afc46bac5e7689eb38 /modules/commands
parent2370c16f1e9d395e47fc8963b1c301dff160c547 (diff)
Fixed non-debug build
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/cs_access.cpp4
-rw-r--r--modules/commands/cs_entrymsg.cpp2
-rw-r--r--modules/commands/cs_flags.cpp2
-rw-r--r--modules/commands/cs_mode.cpp4
-rw-r--r--modules/commands/cs_seen.cpp2
-rw-r--r--modules/commands/cs_set_misc.cpp2
-rw-r--r--modules/commands/cs_suspend.cpp2
-rw-r--r--modules/commands/cs_xop.cpp4
-rw-r--r--modules/commands/hs_request.cpp2
-rw-r--r--modules/commands/ms_cancel.cpp4
-rw-r--r--modules/commands/ms_del.cpp2
-rw-r--r--modules/commands/ms_info.cpp2
-rw-r--r--modules/commands/ms_list.cpp2
-rw-r--r--modules/commands/ms_read.cpp2
-rw-r--r--modules/commands/ns_ajoin.cpp2
-rw-r--r--modules/commands/ns_set_misc.cpp2
-rw-r--r--modules/commands/ns_suspend.cpp2
-rw-r--r--modules/commands/os_config.cpp18
-rw-r--r--modules/commands/os_defcon.cpp2
-rw-r--r--modules/commands/os_forbid.h2
-rw-r--r--modules/commands/os_ignore.h2
-rw-r--r--modules/commands/os_news.h2
-rw-r--r--modules/commands/os_oper.cpp2
-rw-r--r--modules/commands/os_session.h2
24 files changed, 36 insertions, 36 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index a37446df2..30c291da3 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -50,7 +50,7 @@ class AccessChanAccess : public ChanAccess
{
if (access->provider->name == "access/access")
{
- const AccessChanAccess *aaccess = debug_cast<const AccessChanAccess *>(access);
+ const AccessChanAccess *aaccess = anope_dynamic_static_cast<const AccessChanAccess *>(access);
return aaccess->level;
}
else
@@ -160,7 +160,7 @@ class CommandCSAccess : public Command
service_reference<AccessProvider> provider("AccessProvider", "access/access");
if (!provider)
return;
- AccessChanAccess *access = debug_cast<AccessChanAccess *>(provider->Create());
+ AccessChanAccess *access = anope_dynamic_static_cast<AccessChanAccess *>(provider->Create());
access->ci = ci;
access->mask = mask;
access->creator = u->nick;
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp
index 9b5a6753c..3be4d53c7 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/commands/cs_entrymsg.cpp
@@ -63,7 +63,7 @@ Serializable* EntryMsg::unserialize(Serializable *obj, Serialize::Data &data)
if (obj)
{
- EntryMsg *msg = debug_cast<EntryMsg *>(obj);
+ EntryMsg *msg = anope_dynamic_static_cast<EntryMsg *>(obj);
msg->ci = ci;
data["creator"] >> msg->creator;
data["message"] >> msg->message;
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 222409eca..35c2aac0a 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -196,7 +196,7 @@ class CommandCSFlags : public Command
service_reference<AccessProvider> provider("AccessProvider", "access/flags");
if (!provider)
return;
- FlagsChanAccess *access = debug_cast<FlagsChanAccess *>(provider->Create());
+ FlagsChanAccess *access = anope_dynamic_static_cast<FlagsChanAccess *>(provider->Create());
access->ci = ci;
access->mask = mask;
access->creator = u->nick;
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 425a54a01..452b3b365 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -22,7 +22,7 @@ class CommandCSMode : public Command
const Anope::string accesses[] = { "VOICE", "HALFOP", "OPDEOP", "PROTECT", "OWNER", "" };
const ChannelModeName modes[] = { CMODE_VOICE, CMODE_HALFOP, CMODE_OP, CMODE_PROTECT, CMODE_OWNER };
- ChannelModeStatus *cms = debug_cast<ChannelModeStatus *>(cm);
+ ChannelModeStatus *cms = anope_dynamic_static_cast<ChannelModeStatus *>(cm);
AccessGroup access = ci->AccessFor(u);
unsigned short u_level = 0;
@@ -32,7 +32,7 @@ class CommandCSMode : public Command
ChannelMode *cm2 = ModeManager::FindChannelModeByName(modes[i]);
if (cm2 == NULL || cm2->Type != MODE_STATUS)
continue;
- ChannelModeStatus *cms2 = debug_cast<ChannelModeStatus *>(cm2);
+ ChannelModeStatus *cms2 = anope_dynamic_static_cast<ChannelModeStatus *>(cm2);
if (cms2->Level > u_level)
u_level = cms2->Level;
}
diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp
index 3f7b276f7..ec3ac708f 100644
--- a/modules/commands/cs_seen.cpp
+++ b/modules/commands/cs_seen.cpp
@@ -61,7 +61,7 @@ struct SeenInfo : Serializable
{
SeenInfo *s;
if (obj)
- s = debug_cast<SeenInfo *>(obj);
+ s = anope_dynamic_static_cast<SeenInfo *>(obj);
else
s = new SeenInfo();
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index ab40f9fdc..4a2e8fec5 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -47,7 +47,7 @@ struct CSMiscData : ExtensibleItem, Serializable
CSMiscData *d;
if (obj)
{
- d = debug_cast<CSMiscData *>(obj);
+ d = anope_dynamic_static_cast<CSMiscData *>(obj);
d->ci = ci;
data["name"] >> d->name;
data["data"] >> d->data;
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp
index d5898083e..803202a26 100644
--- a/modules/commands/cs_suspend.cpp
+++ b/modules/commands/cs_suspend.cpp
@@ -50,7 +50,7 @@ struct ChanSuspend : ExtensibleItem, Serializable
ChanSuspend *cs;
if (obj)
- cs = debug_cast<ChanSuspend *>(obj);
+ cs = anope_dynamic_static_cast<ChanSuspend *>(obj);
else
cs = new ChanSuspend();
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 807cbe1f6..18adeadb0 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -149,7 +149,7 @@ class XOPChanAccess : public ChanAccess
{
if (access->provider->name == "access/xop")
{
- const XOPChanAccess *xaccess = debug_cast<const XOPChanAccess *>(access);
+ const XOPChanAccess *xaccess = anope_dynamic_static_cast<const XOPChanAccess *>(access);
return xaccess->type;
}
else
@@ -263,7 +263,7 @@ class XOPBase : public Command
service_reference<AccessProvider> provider("AccessProvider", "access/xop");
if (!provider)
return;
- XOPChanAccess *acc = debug_cast<XOPChanAccess *>(provider->Create());
+ XOPChanAccess *acc = anope_dynamic_static_cast<XOPChanAccess *>(provider->Create());
acc->ci = ci;
acc->mask = mask;
acc->creator = u->nick;
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp
index e44fa06e2..ae1077a68 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/commands/hs_request.cpp
@@ -55,7 +55,7 @@ struct HostRequest : ExtensibleItem, Serializable
HostRequest *req;
if (obj)
- req = debug_cast<HostRequest *>(obj);
+ req = anope_dynamic_static_cast<HostRequest *>(obj);
else
req = new HostRequest;
req->nick = na->nick;
diff --git a/modules/commands/ms_cancel.cpp b/modules/commands/ms_cancel.cpp
index 059ca2f06..f6f863e71 100644
--- a/modules/commands/ms_cancel.cpp
+++ b/modules/commands/ms_cancel.cpp
@@ -39,8 +39,8 @@ class CommandMSCancel : public Command
source.Reply(ischan ? CHAN_X_NOT_REGISTERED : _(NICK_X_NOT_REGISTERED), nname.c_str());
else
{
- ChannelInfo *ci;
- NickAlias *na;
+ ChannelInfo *ci = NULL;
+ NickAlias *na = NULL;
if (ischan)
ci = cs_findchan(nname);
else
diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp
index 0ad906c49..bfee5124f 100644
--- a/modules/commands/ms_del.cpp
+++ b/modules/commands/ms_del.cpp
@@ -52,7 +52,7 @@ class CommandMSDel : public Command
User *u = source.u;
MemoInfo *mi;
- ChannelInfo *ci;
+ ChannelInfo *ci = NULL;
Anope::string numstr = !params.empty() ? params[0] : "", chan;
if (!numstr.empty() && numstr[0] == '#')
diff --git a/modules/commands/ms_info.cpp b/modules/commands/ms_info.cpp
index 3f132f1d2..05d241ced 100644
--- a/modules/commands/ms_info.cpp
+++ b/modules/commands/ms_info.cpp
@@ -28,7 +28,7 @@ class CommandMSInfo : public Command
const MemoInfo *mi;
const NickAlias *na = NULL;
- ChannelInfo *ci;
+ ChannelInfo *ci = NULL;
const Anope::string &nname = !params.empty() ? params[0] : "";
int hardmax = 0;
diff --git a/modules/commands/ms_list.cpp b/modules/commands/ms_list.cpp
index bbf245b46..1ba0644aa 100644
--- a/modules/commands/ms_list.cpp
+++ b/modules/commands/ms_list.cpp
@@ -27,7 +27,7 @@ class CommandMSList : public Command
User *u = source.u;
Anope::string param = !params.empty() ? params[0] : "", chan;
- ChannelInfo *ci;
+ ChannelInfo *ci = NULL;
const MemoInfo *mi;
if (!param.empty() && param[0] == '#')
diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp
index c9d0c4345..341d8f828 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/commands/ms_read.cpp
@@ -96,7 +96,7 @@ class CommandMSRead : public Command
User *u = source.u;
MemoInfo *mi;
- ChannelInfo *ci;
+ ChannelInfo *ci = NULL;
Anope::string numstr = params[0], chan;
if (!numstr.empty() && numstr[0] == '#')
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 50bce89e3..2e279256b 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -51,7 +51,7 @@ struct AJoinList : std::vector<std::pair<Anope::string, Anope::string> >, Extens
AJoinList *aj;
if (obj)
- aj = debug_cast<AJoinList *>(obj);
+ aj = anope_dynamic_static_cast<AJoinList *>(obj);
else
{
aj = new AJoinList(nc);
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp
index f09b4ddee..f9000f387 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/commands/ns_set_misc.cpp
@@ -48,7 +48,7 @@ struct NSMiscData : ExtensibleItem, Serializable
NSMiscData *d;
if (obj)
{
- d = debug_cast<NSMiscData *>(obj);
+ d = anope_dynamic_static_cast<NSMiscData *>(obj);
d->nc = nc;
data["name"] >> d->name;
data["data"] >> d->data;
diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp
index dd20e47b8..f965be321 100644
--- a/modules/commands/ns_suspend.cpp
+++ b/modules/commands/ns_suspend.cpp
@@ -45,7 +45,7 @@ struct NickSuspend : ExtensibleItem, Serializable
NickSuspend *ns;
if (obj)
- ns = debug_cast<NickSuspend *>(obj);
+ ns = anope_dynamic_static_cast<NickSuspend *>(obj);
else
ns = new NickSuspend();
diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp
index 6f7ebb90c..d1a890106 100644
--- a/modules/commands/os_config.cpp
+++ b/modules/commands/os_config.cpp
@@ -69,63 +69,63 @@ class CommandOSConfig : public Command
{
case DT_NOSPACES:
{
- ValueContainerString *vcs = debug_cast<ValueContainerString *>(v->val);
+ ValueContainerString *vcs = anope_dynamic_static_cast<ValueContainerString *>(v->val);
Config->ValidateNoSpaces(vi.GetValue(), v->tag, v->value);
vcs->Set(vi.GetValue());
break;
}
case DT_HOSTNAME:
{
- ValueContainerString *vcs = debug_cast<ValueContainerString *>(v->val);
+ ValueContainerString *vcs = anope_dynamic_static_cast<ValueContainerString *>(v->val);
Config->ValidateHostname(vi.GetValue(), v->tag, v->value);
vcs->Set(vi.GetValue());
break;
}
case DT_IPADDRESS:
{
- ValueContainerString *vcs = debug_cast<ValueContainerString *>(v->val);
+ ValueContainerString *vcs = anope_dynamic_static_cast<ValueContainerString *>(v->val);
Config->ValidateIP(vi.GetValue(), v->tag, v->value, allow_wild);
vcs->Set(vi.GetValue());
break;
}
case DT_STRING:
{
- ValueContainerString *vcs = debug_cast<ValueContainerString *>(v->val);
+ ValueContainerString *vcs = anope_dynamic_static_cast<ValueContainerString *>(v->val);
vcs->Set(vi.GetValue());
break;
}
case DT_INTEGER:
{
int val = vi.GetInteger();
- ValueContainerInt *vci = debug_cast<ValueContainerInt *>(v->val);
+ ValueContainerInt *vci = anope_dynamic_static_cast<ValueContainerInt *>(v->val);
vci->Set(&val, sizeof(int));
break;
}
case DT_UINTEGER:
{
unsigned val = vi.GetInteger();
- ValueContainerUInt *vci = debug_cast<ValueContainerUInt *>(v->val);
+ ValueContainerUInt *vci = anope_dynamic_static_cast<ValueContainerUInt *>(v->val);
vci->Set(&val, sizeof(unsigned));
break;
}
case DT_LUINTEGER:
{
unsigned long val = vi.GetInteger();
- ValueContainerLUInt *vci = debug_cast<ValueContainerLUInt *>(v->val);
+ ValueContainerLUInt *vci = anope_dynamic_static_cast<ValueContainerLUInt *>(v->val);
vci->Set(&val, sizeof(unsigned long));
break;
}
case DT_TIME:
{
time_t time = dotime(vi.GetValue());
- ValueContainerTime *vci = debug_cast<ValueContainerTime *>(v->val);
+ ValueContainerTime *vci = anope_dynamic_static_cast<ValueContainerTime *>(v->val);
vci->Set(&time, sizeof(time_t));
break;
}
case DT_BOOLEAN:
{
bool val = vi.GetBool();
- ValueContainerBool *vcb = debug_cast<ValueContainerBool *>(v->val);
+ ValueContainerBool *vcb = anope_dynamic_static_cast<ValueContainerBool *>(v->val);
vcb->Set(&val, sizeof(bool));
break;
}
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp
index 1cf09c259..6b305c736 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/commands/os_defcon.cpp
@@ -293,7 +293,7 @@ class OSDefcon : public Module
if (cm->Type == MODE_PARAM)
{
- cmp = debug_cast<ChannelModeParam *>(cm);
+ cmp = anope_dynamic_static_cast<ChannelModeParam *>(cm);
if (!ss.GetToken(param))
{
diff --git a/modules/commands/os_forbid.h b/modules/commands/os_forbid.h
index 30fdb9611..dcc5a9d6e 100644
--- a/modules/commands/os_forbid.h
+++ b/modules/commands/os_forbid.h
@@ -60,7 +60,7 @@ Serializable* ForbidData::unserialize(Serializable *obj, Serialize::Data &data)
ForbidData *fb;
if (obj)
- fb = debug_cast<ForbidData *>(obj);
+ fb = anope_dynamic_static_cast<ForbidData *>(obj);
else
fb = new ForbidData;
diff --git a/modules/commands/os_ignore.h b/modules/commands/os_ignore.h
index 1eb505398..7c9bf3db5 100644
--- a/modules/commands/os_ignore.h
+++ b/modules/commands/os_ignore.h
@@ -62,7 +62,7 @@ Serializable* IgnoreData::unserialize(Serializable *obj, Serialize::Data &data)
if (obj)
{
- IgnoreData *ign = debug_cast<IgnoreData *>(obj);
+ IgnoreData *ign = anope_dynamic_static_cast<IgnoreData *>(obj);
data["mask"] >> ign->mask;
data["creator"] >> ign->creator;
data["reason"] >> ign->reason;
diff --git a/modules/commands/os_news.h b/modules/commands/os_news.h
index f2507473a..e2ad1fc4f 100644
--- a/modules/commands/os_news.h
+++ b/modules/commands/os_news.h
@@ -60,7 +60,7 @@ Serializable* NewsItem::unserialize(Serializable *obj, Serialize::Data &data)
NewsItem *ni;
if (obj)
- ni = debug_cast<NewsItem *>(obj);
+ ni = anope_dynamic_static_cast<NewsItem *>(obj);
else
ni = new NewsItem();
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp
index 22560dd18..fe9b06f9f 100644
--- a/modules/commands/os_oper.cpp
+++ b/modules/commands/os_oper.cpp
@@ -43,7 +43,7 @@ struct MyOper : Oper, Serializable
MyOper *myo;
if (obj)
- myo = debug_cast<MyOper *>(obj);
+ myo = anope_dynamic_static_cast<MyOper *>(obj);
else
myo = new MyOper(nc->display, ot);
nc->o = myo;
diff --git a/modules/commands/os_session.h b/modules/commands/os_session.h
index b40177a32..75764b12d 100644
--- a/modules/commands/os_session.h
+++ b/modules/commands/os_session.h
@@ -72,7 +72,7 @@ Serializable* Exception::unserialize(Serializable *obj, Serialize::Data &data)
Exception *ex;
if (obj)
- ex = debug_cast<Exception *>(obj);
+ ex = anope_dynamic_static_cast<Exception *>(obj);
else
ex = new Exception;
data["mask"] >> ex->mask;