summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 16:48:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-02 16:48:00 +0000
commit17ca73f1f204cd3e53f0200367a0eccef6efc380 (patch)
tree415e35bee5d180cda8e072bb9729f0696924fe9a /src/commands.cpp
parent055b733595c6a10b33fe37d1b754b3e8a365b888 (diff)
is_uline was an inefficient piece of crap - fixed.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3428 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 048a5fae7..9bf4883f9 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -177,22 +177,12 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i
/* XXX - these really belong in helperfuncs perhaps -- w00t */
bool is_uline(const char* server)
{
- char ServName[MAXBUF];
-
if (!server)
return false;
- if (!(*server))
+ if (!*server)
return true;
- for (int i = 0; i < Config->ConfValueEnum("uline",&Config->config_f); i++)
- {
- Config->ConfValue("uline","server",i,ServName,&Config->config_f);
- if (!strcasecmp(server,ServName))
- {
- return true;
- }
- }
- return false;
+ return (find(Config->ulines.begin(),Config->ulines.end(),server) != Config->ulines.end());
}
int operstrcmp(char* data,char* input)