namespace nspace
{
+ void strlower(char *n);
+
template<> struct hash<insp_inaddr>
{
size_t operator()(const insp_inaddr &a) const;
#define STRINGIFY(x) STRINGIFY2(x)
#define log(l, x, args...) InspIRCd::Log(l, __FILE__ ":" STRINGIFY(__LINE__) ": " x, ##args)
-void strlower(char *n);
void Error(int status);
void ShowMOTD(userrec *user);
void ShowRULES(userrec *user);
using namespace std;
using namespace irc::sockets;
+/* convert a string to lowercase. Note following special circumstances
+ * taken from RFC 1459. Many "official" server branches still hold to this
+ * rule so i will too;
+ *
+ * Because of IRC's scandanavian origin, the characters {}| are
+ * considered to be the lower case equivalents of the characters []\,
+ * respectively. This is a critical issue when determining the
+ * equivalence of two nicknames.
+ */
+void nspace::strlower(char *n)
+{
+ if (n)
+ {
+ for (char* t = n; *t; t++)
+ *t = lowermap[(unsigned char)*t];
+ }
+}
+
size_t nspace::hash<insp_inaddr>::operator()(const insp_inaddr &a) const
{
size_t q;
}
}
-/* convert a string to lowercase. Note following special circumstances
- * taken from RFC 1459. Many "official" server branches still hold to this
- * rule so i will too;
- *
- * Because of IRC's scandanavian origin, the characters {}| are
- * considered to be the lower case equivalents of the characters []\,
- * respectively. This is a critical issue when determining the
- * equivalence of two nicknames.
- */
-void strlower(char *n)
-{
- if (n)
- {
- for (char* t = n; *t; t++)
- *t = lowermap[(unsigned char)*t];
- }
-}
-
/* Find a user record by nickname and return a pointer to it */
userrec* InspIRCd::FindNick(const std::string &nick)
strlcpy(search,parameters[0],MAXBUF);
}
- strlower(search);
+ for (char* n = search; *n; n++)
+ *n = tolower(*n);
for (int i = 1; output != ""; i++)
{