summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/utils.cpp')
-rw-r--r--src/modules/m_spanningtree/utils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 705566d44..0bf8dd994 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -32,9 +32,11 @@
bool SpanningTreeUtilities::IsSID(const std::string &str)
{
/* Returns true if the string given is exactly 3 characters long,
- * starts with a digit, and has no '.' in the other 2
+ * starts with a digit, and the other two characters are A-Z or digits
*/
- return ((str.length() == 3) && isdigit(str[0]) && (str[1] != '.' && str[2] != '.'));
+ return ((str.length() == 3) && isdigit(str[0]) &&
+ ((str[1] >= 'A' && str[1] <= 'Z') || isdigit(str[1])) &&
+ ((str[2] >= 'A' && str[2] <= 'Z') || isdigit(str[2])));
}
/** Yay for fast searches!