summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-07 18:39:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-07 18:39:00 +0000
commit6faa21240d360000d02ff1943b04d2ac9e15df95 (patch)
treef664ef64debbdfe508e8234989ad3e8a39989243 /src
parentdba88edc767697f9c2a9de3c4c2fbaea6cc35f3e (diff)
Faster ADDLINE code
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3128 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 0710b9b0a..68a278c53 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1560,37 +1560,31 @@ class TreeSocket : public InspSocket
{
if (params.size() < 6)
return true;
- std::string linetype = params[0]; /* Z, Q, E, G, K */
- std::string mask = params[1]; /* Line type dependent */
- std::string source = params[2]; /* may not be online or may be a server */
- std::string settime = params[3]; /* EPOCH time set */
- std::string duration = params[4]; /* Duration secs */
- std::string reason = params[5];
- switch (*(linetype.c_str()))
+ switch (*(params[0].c_str()))
{
case 'Z':
- add_zline(atoi(duration.c_str()), source.c_str(), reason.c_str(), mask.c_str());
- zline_set_creation_time((char*)mask.c_str(), atoi(settime.c_str()));
+ add_zline(atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
+ zline_set_creation_time((char*)params[1].c_str(), atoi(params[3].c_str()));
break;
case 'Q':
- add_qline(atoi(duration.c_str()), source.c_str(), reason.c_str(), mask.c_str());
- qline_set_creation_time((char*)mask.c_str(), atoi(settime.c_str()));
+ add_qline(atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
+ qline_set_creation_time((char*)params[1].c_str(), atoi(params[3].c_str()));
break;
case 'E':
- add_eline(atoi(duration.c_str()), source.c_str(), reason.c_str(), mask.c_str());
- eline_set_creation_time((char*)mask.c_str(), atoi(settime.c_str()));
+ add_eline(atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
+ eline_set_creation_time((char*)params[1].c_str(), atoi(params[3].c_str()));
break;
case 'G':
- add_gline(atoi(duration.c_str()), source.c_str(), reason.c_str(), mask.c_str());
- gline_set_creation_time((char*)mask.c_str(), atoi(settime.c_str()));
+ add_gline(atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
+ gline_set_creation_time((char*)params[1].c_str(), atoi(params[3].c_str()));
break;
case 'K':
- add_kline(atoi(duration.c_str()), source.c_str(), reason.c_str(), mask.c_str());
+ add_kline(atoi(params[4].c_str()), params[2].c_str(), params[5].c_str(), params[1].c_str());
break;
default:
/* Just in case... */
- Srv->SendOpers("*** \2WARNING\2: Invalid xline type '"+linetype+"' sent by server "+prefix+", ignored!");
+ Srv->SendOpers("*** \2WARNING\2: Invalid xline type '"+params[0]+"' sent by server "+prefix+", ignored!");
break;
}
/* Send it on its way */