- if (userFunction *u = userFunctions[command])
- userFunctions[alias] =
- new
- userFunction(u->function,
- u->minLevel,
- u->needsChannelName);
+ StringTokenizer st(temp);
+
+ line++;
+ temp = Utils::trim_str (temp);
+
+ if (temp[0]=='#')
+ {
+ continue;
+ }
+
+ if (st.count_tokens (' ') != 2)
+ {
+ std::cerr << "Error when reading alias file (" << initFileName
+ << ") line " << line << "...\n";
+ continue;
+ }
+
+ alias = Utils::to_upper (st.next_token());
+ command = Utils::to_upper (st.next_token());
+
+ // Does the function already exist ?
+ if (!userFunctions[alias])
+ {
+ if (userFunction *u = userFunctions[command])
+ userFunctions[alias] =
+ new
+ userFunction(u->function,
+ u->minLevel,
+ u->needsChannelName);
+ }