diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-30 06:37:06 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-30 06:37:06 +0000 |
commit | 7456e47914b588f207a98c17a25fcdd2a8f4d176 (patch) | |
tree | 7a052086980a1082ed9227f25aec291cefd9fd86 /src/modules | |
parent | b1672e3514c5f17e2d32699e3bb3398e6a63e971 (diff) |
Removed something out of a loop that didn't belong there.. more nazi w00tie.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2025 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_sajoin.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 76c568ea7..f82bba203 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -31,9 +31,17 @@ void handle_sajoin(char **parameters, int pcnt, userrec *user) userrec* dest = Srv->FindNick(std::string(parameters[0])); if (dest) { + /* might be nicer to make checking valid channel names an api function sometime --w00t */ + if (parameters[1][0] != '#') + { + /* we didn't need to check this for each character ;) */ + Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name"); + return; + } + for (unsigned int x = 0; x < strlen(parameters[1]); x++) { - if ((parameters[1][0] != '#') || (parameters[1][x] == ' ') || (parameters[1][x] == ',')) + if ((parameters[1][x] == ' ') || (parameters[1][x] == ',')) { Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name"); return; |