- if (initFile) {
- String temp, alias, command;
- int line = 0;
- while (initFile >> temp, temp.length() != 0) {
- line++;
- StringTokenizer st(temp);
- temp = Utils::trim_str (temp);
- if (temp[(unsigned int)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 (initFile)
+ {
+ // FIXME: these variables are current String instead of
+ // std::string because String>> reads an entire line. This code
+ // needs to be rewritten to use std::string and std::getline (or
+ // better yet, be removed entirely once BotConfig is in place)
+ String temp, alias, command;
+ int line = 0;
+
+ while (initFile >> temp, temp.length() != 0)