mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1139 lines
39 KiB

  1. --- ./libicq2000-0.1/libicq2000/sigslot.h.orig 2004-02-11 01:51:44.000000000 +0200
  2. +++ ./libicq2000-0.1/libicq2000/sigslot.h 2004-05-04 11:35:10.000000000 +0300
  3. @@ -745,8 +745,8 @@
  4. public:
  5. _connection0()
  6. {
  7. - pobject = NULL;
  8. - pmemfun = NULL;
  9. + this->pobject = NULL;
  10. + this->pmemfun = NULL;
  11. }
  12. _connection0(dest_type* pobject, void (dest_type::*pmemfun)())
  13. @@ -786,8 +786,8 @@
  14. public:
  15. _connection1()
  16. {
  17. - pobject = NULL;
  18. - pmemfun = NULL;
  19. + this->pobject = NULL;
  20. + this->pmemfun = NULL;
  21. }
  22. _connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type))
  23. @@ -827,8 +827,8 @@
  24. public:
  25. _connection2()
  26. {
  27. - pobject = NULL;
  28. - pmemfun = NULL;
  29. + this->pobject = NULL;
  30. + this->pmemfun = NULL;
  31. }
  32. _connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, arg2_type))
  33. @@ -889,7 +889,7 @@
  34. lock_block<mt_policy> lock(this);
  35. _connection0<dest_type, mt_policy>* conn
  36. = new _connection0<dest_type, mt_policy>(pclass, pmemfun);
  37. - m_connected_slots.push_back(conn);
  38. + this->m_connected_slots.push_back(conn);
  39. pclass->signal_connect(this);
  40. }
  41. @@ -897,15 +897,15 @@
  42. {
  43. lock_block<mt_policy> lock(this);
  44. _sig_connection0<mt_policy>* conn = new _sig_connection0<mt_policy>(chainsig);
  45. - m_connected_slots.push_back(conn);
  46. + this->m_connected_slots.push_back(conn);
  47. chainsig.signal_connect(this);
  48. }
  49. void emit()
  50. {
  51. lock_block<mt_policy> lock(this);
  52. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  53. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  54. + typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  55. + typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  56. while(it != itEnd)
  57. {
  58. @@ -921,8 +921,8 @@
  59. void operator()()
  60. {
  61. lock_block<mt_policy> lock(this);
  62. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  63. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  64. + typename _signal_base0< mt_policy >::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  65. + typename _signal_base0< mt_policy >::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  66. while(it != itEnd)
  67. {
  68. @@ -957,7 +957,7 @@
  69. lock_block<mt_policy> lock(this);
  70. _connection1<dest_type, arg1_type, mt_policy>* conn
  71. = new _connection1<dest_type, arg1_type, mt_policy>(pclass, pmemfun);
  72. - m_connected_slots.push_back(conn);
  73. + this->m_connected_slots.push_back(conn);
  74. pclass->signal_connect(this);
  75. }
  76. @@ -965,15 +965,15 @@
  77. {
  78. lock_block<mt_policy> lock(this);
  79. _sig_connection1<arg1_type, mt_policy>* conn = new _sig_connection1<arg1_type, mt_policy>(chainsig);
  80. - m_connected_slots.push_back(conn);
  81. + this->m_connected_slots.push_back(conn);
  82. chainsig.signal_connect(this);
  83. }
  84. void emit(arg1_type a1)
  85. {
  86. lock_block<mt_policy> lock(this);
  87. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  88. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  89. + typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  90. + typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  91. while(it != itEnd)
  92. {
  93. @@ -989,8 +989,8 @@
  94. void operator()(arg1_type a1)
  95. {
  96. lock_block<mt_policy> lock(this);
  97. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  98. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  99. + typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  100. + typename _signal_base1<arg1_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  101. while(it != itEnd)
  102. {
  103. @@ -1025,7 +1025,7 @@
  104. lock_block<mt_policy> lock(this);
  105. _connection2<dest_type, arg1_type, arg2_type, mt_policy>* conn
  106. = new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(pclass, pmemfun);
  107. - m_connected_slots.push_back(conn);
  108. + this->m_connected_slots.push_back(conn);
  109. pclass->signal_connect(this);
  110. }
  111. @@ -1033,15 +1033,15 @@
  112. {
  113. lock_block<mt_policy> lock(this);
  114. _sig_connection2<arg1_type, arg2_type, mt_policy>* conn = new _sig_connection2<arg1_type, arg2_type, mt_policy>(chainsig);
  115. - m_connected_slots.push_back(conn);
  116. + this->m_connected_slots.push_back(conn);
  117. chainsig.signal_connect(this);
  118. }
  119. void emit(arg1_type a1, arg2_type a2)
  120. {
  121. lock_block<mt_policy> lock(this);
  122. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  123. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  124. + typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  125. + typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  126. while(it != itEnd)
  127. {
  128. @@ -1057,8 +1057,8 @@
  129. void operator()(arg1_type a1, arg2_type a2)
  130. {
  131. lock_block<mt_policy> lock(this);
  132. - typename connections_list::const_iterator itNext, it = m_connected_slots.begin();
  133. - typename connections_list::const_iterator itEnd = m_connected_slots.end();
  134. + typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itNext, it = this->m_connected_slots.begin();
  135. + typename _signal_base2<arg1_type, arg2_type, mt_policy>::connections_list::const_iterator itEnd = this->m_connected_slots.end();
  136. while(it != itEnd)
  137. {
  138. --- ./src/accountmanager.cc.orig 2004-02-04 09:44:41.000000000 +0200
  139. +++ ./src/accountmanager.cc 2004-05-04 12:46:43.460755640 +0300
  140. @@ -47,7 +47,7 @@
  141. void accountmanager::exec() {
  142. dialogbox db;
  143. - protocolname pname;
  144. + int pname;
  145. icqconf::imaccount account;
  146. int n, b, i, citem, action, pos;
  147. set<hookcapab::enumeration> capab;
  148. @@ -75,15 +75,15 @@
  149. for(fin = false; !fin; ) {
  150. t.clear();
  151. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  152. - account = conf.getourid(pname);
  153. + for(pname = icq; pname != protocolname_size; pname += 1) {
  154. + account = conf.getourid((protocolname)pname);
  155. if(pname != rss)
  156. - if(gethook(pname).enabled() || !account.empty()) {
  157. - account = conf.getourid(pname);
  158. - n = t.addnode(0, 0, 0, " " + conf.getprotocolname(pname) + " ");
  159. - citem = ((int) (pname)+1) * 100;
  160. - capab = gethook(pname).getCapabs();
  161. + if(gethook((protocolname)pname).enabled() || !account.empty()) {
  162. + account = conf.getourid((protocolname)pname);
  163. + n = t.addnode(0, 0, 0, " " + conf.getprotocolname((protocolname)pname) + " ");
  164. + citem = (pname+1) * 100;
  165. + capab = gethook((protocolname)pname).getCapabs();
  166. if(!account.empty()) {
  167. tmp = "";
  168. @@ -154,9 +154,9 @@
  169. pname = (protocolname) (citem/100-1);
  170. action = citem-(citem/100)*100;
  171. - spname = conf.getprotocolname(pname);
  172. - account = conf.getourid(pname);
  173. - abstracthook &hook = gethook(pname);
  174. + spname = conf.getprotocolname((protocolname)pname);
  175. + account = conf.getourid((protocolname)pname);
  176. + abstracthook &hook = gethook((protocolname)pname);
  177. switch(action) {
  178. case 1:
  179. @@ -190,7 +190,7 @@
  180. case 8:
  181. if(!hook.online()) {
  182. - account = icqconf::imaccount(pname);
  183. + account = icqconf::imaccount((protocolname)pname);
  184. } else {
  185. face.status(_("You have to disconnect the service first!"));
  186. }
  187. @@ -215,9 +215,9 @@
  188. break;
  189. case 10:
  190. - if(face.edit(tmp = conf.getawaymsg(pname),
  191. + if(face.edit(tmp = conf.getawaymsg((protocolname)pname),
  192. spname + ": " + _("away message"))) {
  193. - conf.setawaymsg(pname, tmp);
  194. + conf.setawaymsg((protocolname)pname, tmp);
  195. }
  196. break;
  197. --- ./src/centericq.cc.orig 2004-04-11 19:32:27.000000000 +0300
  198. +++ ./src/centericq.cc 2004-05-04 13:38:34.300836064 +0300
  199. @@ -71,8 +71,8 @@
  200. if(p)
  201. if(rus = (((string) p).substr(0, 2) == "ru")) {
  202. conf.setcharsets("cp1251", "koi8-r");
  203. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  204. - conf.setcpconvert(pname, true);
  205. + for(int pname = icq; pname != protocolname_size; pname += 1)
  206. + conf.setcpconvert((protocolname)pname, true);
  207. }
  208. if(updateconf()) {
  209. @@ -118,20 +118,20 @@
  210. }
  211. bool centericq::checkpasswords() {
  212. - protocolname pname;
  213. + int pname;
  214. icqconf::imaccount ia;
  215. bool r;
  216. r = regmode = true;
  217. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  218. - if(gethook(pname).enabled() && !gethook(pname).getCapabs().count(hookcapab::optionalpassword)) {
  219. - if(!(ia = conf.getourid(pname)).empty()) {
  220. + for(pname = icq; pname != protocolname_size; pname += 1) {
  221. + if(gethook((protocolname)pname).enabled() && !gethook((protocolname)pname).getCapabs().count(hookcapab::optionalpassword)) {
  222. + if(!(ia = conf.getourid((protocolname)pname)).empty()) {
  223. if(ia.password.empty()) {
  224. conf.setsavepwd(false);
  225. ia.password = face.inputstr("[" +
  226. - conf.getprotocolname(pname) + "] " +
  227. + conf.getprotocolname((protocolname)pname) + "] " +
  228. _("password: "), "", '*');
  229. if(ia.password.empty()) {
  230. @@ -150,10 +150,10 @@
  231. }
  232. void centericq::inithooks() {
  233. - protocolname pname;
  234. + int pname;
  235. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  236. - gethook(pname).init();
  237. + for(pname = icq; pname != protocolname_size; pname += 1) {
  238. + gethook((protocolname)pname).init();
  239. }
  240. }
  241. @@ -836,25 +836,25 @@
  242. }
  243. void centericq::rereadstatus() {
  244. - protocolname pname;
  245. + int pname;
  246. icqconf::imaccount ia;
  247. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  248. - ia = conf.getourid(pname);
  249. + for(pname = icq; pname != protocolname_size; pname += 1) {
  250. + ia = conf.getourid((protocolname)pname);
  251. if(!ia.empty()) {
  252. char cst;
  253. - imstatus st;
  254. - string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname(pname));
  255. + int st;
  256. + string fname = conf.getconfigfname((string) "status-" + conf.getprotocolname((protocolname)pname));
  257. ifstream f(fname.c_str());
  258. if(f.is_open()) {
  259. f >> cst, f.close(), f.clear();
  260. unlink(fname.c_str());
  261. - for(st = offline; st != imstatus_size; (int) st += 1) {
  262. + for(st = offline; st != imstatus_size; st += 1) {
  263. if(imstatus2char[st] == cst) {
  264. - gethook(pname).setstatus(st);
  265. + gethook((protocolname)pname).setstatus((imstatus)st);
  266. break;
  267. }
  268. }
  269. @@ -1360,7 +1360,7 @@
  270. fd_set rfds, wfds, efds;
  271. struct timeval tv;
  272. int hsockfd;
  273. - protocolname pname;
  274. + int pname;
  275. for(keypressed = fin = false; !keypressed && !fin; ) {
  276. timer_keypress = lastkeypress();
  277. @@ -1375,8 +1375,8 @@
  278. if(!regmode) {
  279. exectimers();
  280. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  281. - abstracthook &hook = gethook(pname);
  282. + for(pname = icq; pname != protocolname_size; pname += 1) {
  283. + abstracthook &hook = gethook((protocolname)pname);
  284. if(hook.online()) {
  285. hook.getsockets(rfds, wfds, efds, hsockfd);
  286. @@ -1394,8 +1394,8 @@
  287. keypressed = true;
  288. time(&timer_keypress);
  289. } else {
  290. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  291. - abstracthook &hook = gethook(pname);
  292. + for(pname = icq; pname != protocolname_size; pname += 1) {
  293. + abstracthook &hook = gethook((protocolname)pname);
  294. if(hook.online())
  295. if(hook.isoursocket(rfds, wfds, efds)) {
  296. @@ -1410,7 +1410,7 @@
  297. }
  298. void centericq::setauto(imstatus astatus) {
  299. - protocolname pname;
  300. + int pname;
  301. imstatus stcurrent;
  302. static bool autoset = false;
  303. bool nautoset, changed = false;
  304. @@ -1424,8 +1424,8 @@
  305. nautoset = false;
  306. }
  307. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  308. - abstracthook &hook = gethook(pname);
  309. + for(pname = icq; pname != protocolname_size; pname += 1) {
  310. + abstracthook &hook = gethook((protocolname)pname);
  311. stcurrent = hook.getstatus();
  312. if(hook.logged())
  313. @@ -1437,7 +1437,7 @@
  314. default:
  315. if(autoset && (astatus == available)) {
  316. face.log(_("+ [%s] status restored"),
  317. - conf.getprotocolname(pname).c_str());
  318. + conf.getprotocolname((protocolname)pname).c_str());
  319. hook.restorestatus();
  320. nautoset = false;
  321. @@ -1452,7 +1452,7 @@
  322. nautoset = changed = true;
  323. face.log(_("+ [%s] automatically set %s"),
  324. - conf.getprotocolname(pname).c_str(),
  325. + conf.getprotocolname((protocolname)pname).c_str(),
  326. astatus == away ? _("away") : _("n/a"));
  327. }
  328. }
  329. @@ -1469,7 +1469,7 @@
  330. #define MINCK0(x, y) (x ? (y ? (x > y ? y : x) : x) : y)
  331. void centericq::exectimers() {
  332. - protocolname pname;
  333. + int pname;
  334. int paway, pna;
  335. bool fonline = false;
  336. @@ -1481,9 +1481,9 @@
  337. *
  338. */
  339. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  340. - if(!conf.getourid(pname).empty() || (pname == rss)) {
  341. - abstracthook &hook = gethook(pname);
  342. + for(pname = icq; pname != protocolname_size; pname += 1) {
  343. + if(!conf.getourid((protocolname)pname).empty() || (pname == rss)) {
  344. + abstracthook &hook = gethook((protocolname)pname);
  345. /*
  346. *
  347. @@ -1495,7 +1495,7 @@
  348. static map<protocolname, reconnectInfo> reconnect;
  349. - if(timer_current-reconnect[pname].timer > reconnect[pname].period) {
  350. + if(timer_current-reconnect[(protocolname)pname].timer > reconnect[(protocolname)pname].period) {
  351. /*
  352. *
  353. * Any need to try auto re-connecting?
  354. @@ -1503,15 +1503,15 @@
  355. */
  356. if(!hook.logged()) {
  357. - reconnect[pname].timer = timer_current;
  358. + reconnect[(protocolname)pname].timer = timer_current;
  359. - if(reconnect[pname].period < 180)
  360. - reconnect[pname].period += reconnect[pname].period/2;
  361. + if(reconnect[(protocolname)pname].period < 180)
  362. + reconnect[(protocolname)pname].period += reconnect[(protocolname)pname].period/2;
  363. if(hook.online()) {
  364. hook.disconnect();
  365. - } else if(conf.getstatus(pname) != offline) {
  366. + } else if(conf.getstatus((protocolname)pname) != offline) {
  367. if(conf.enoughdiskspace() && !manager.isopen()) {
  368. hook.connect();
  369. }
  370. @@ -1519,7 +1519,7 @@
  371. }
  372. } else {
  373. fonline = true;
  374. - reconnect[pname] = reconnectInfo();
  375. + reconnect[(protocolname)pname] = reconnectInfo();
  376. }
  377. }
  378. }
  379. @@ -1577,8 +1577,8 @@
  380. if(!conf.enoughdiskspace()) {
  381. if(fonline) {
  382. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  383. - gethook(pname).disconnect();
  384. + for(pname = icq; pname != protocolname_size; pname += 1)
  385. + gethook((protocolname)pname).disconnect();
  386. face.log(_("! free disk space is less than 10k, going offline"));
  387. face.log(_("! otherwise we can lose events and configuration"));
  388. --- ./src/hooks/abstracthook.cc.orig 2004-04-11 19:32:28.000000000 +0300
  389. +++ ./src/hooks/abstracthook.cc 2004-05-04 12:25:17.237291328 +0300
  390. @@ -71,9 +71,9 @@
  391. void abstracthook::setstatus(imstatus st) {
  392. setautostatus(manualstatus = st);
  393. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
  394. - if(&gethook(pname) == this) {
  395. - conf.savestatus(pname, manualstatus);
  396. + for(int pname = icq; pname != protocolname_size; pname += 1) {
  397. + if(&gethook((protocolname)pname) == this) {
  398. + conf.savestatus((protocolname)pname, manualstatus);
  399. break;
  400. }
  401. }
  402. --- ./src/icqconf.cc.orig 2004-03-17 21:08:31.000000000 +0200
  403. +++ ./src/icqconf.cc 2004-05-04 12:58:09.218504616 +0300
  404. @@ -52,7 +52,7 @@
  405. savepwd = mailcheck = fenoughdiskspace = true;
  406. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
  407. + for(int pname = icq; pname != protocolname_size; pname += 1) {
  408. chatmode[pname] = true;
  409. cpconvert[pname] = entersends[pname] = nonimonline[pname] = false;
  410. }
  411. @@ -376,7 +376,7 @@
  412. string fname = getconfigfname("config"), buf, param, rbuf;
  413. ifstream f(fname.c_str());
  414. imaccount im;
  415. - protocolname pname;
  416. + int pname;
  417. if(f.is_open()) {
  418. mailcheck = askaway = false;
  419. @@ -418,10 +418,10 @@
  420. ptpmin = atoi(getword(buf, "-").c_str());
  421. ptpmax = atoi(buf.c_str());
  422. } else {
  423. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  424. - buf = getprotocolname(pname);
  425. + for(pname = icq; pname != protocolname_size; pname += 1) {
  426. + buf = getprotocolname((protocolname)pname);
  427. if(param.substr(0, buf.size()) == buf) {
  428. - im = getourid(pname);
  429. + im = getourid((protocolname)pname);
  430. im.read(rbuf);
  431. setourid(im);
  432. }
  433. @@ -430,8 +430,8 @@
  434. }
  435. if(fromcharset.empty() && tocharset.empty())
  436. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  437. - if(getcpconvert(pname)) {
  438. + for(pname = icq; pname != protocolname_size; pname += 1) {
  439. + if(getcpconvert((protocolname)pname)) {
  440. fromcharset = "cp1251";
  441. tocharset = "koi8-r";
  442. break;
  443. @@ -470,26 +470,26 @@
  444. if(getaskaway()) f << "askaway" << endl;
  445. param = "";
  446. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  447. - if(getchatmode(pname)) param += (string) " " + conf.getprotocolname(pname);
  448. + for(int pname = icq; pname != protocolname_size; pname += 1)
  449. + if(getchatmode((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
  450. if(!param.empty())
  451. f << "chatmode" << param << endl;
  452. param = "";
  453. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  454. - if(getentersends(pname)) param += (string) " " + conf.getprotocolname(pname);
  455. + for(int pname = icq; pname != protocolname_size; pname += 1)
  456. + if(getentersends((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
  457. if(!param.empty())
  458. f << "entersends" << param << endl;
  459. param = "";
  460. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  461. - if(getnonimonline(pname)) param += (string) " " + conf.getprotocolname(pname);
  462. + for(int pname = icq; pname != protocolname_size; pname += 1)
  463. + if(getnonimonline((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
  464. if(!param.empty())
  465. f << "nonimonline" << param << endl;
  466. param = "";
  467. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  468. - if(getcpconvert(pname)) param += (string) " " + conf.getprotocolname(pname);
  469. + for(int pname = icq; pname != protocolname_size; pname += 1)
  470. + if(getcpconvert((protocolname)pname)) param += (string) " " + conf.getprotocolname((protocolname)pname);
  471. if(!param.empty())
  472. f << "convert" << param << endl;
  473. @@ -594,7 +594,7 @@
  474. string tname = getconfigfname("sounds"), buf, suin, skey;
  475. int n, ffuin, i;
  476. icqcontact *c;
  477. - imevent::imeventtype it;
  478. + int it;
  479. typedef pair<imevent::imeventtype, string> eventsound;
  480. vector<eventsound> soundnames;
  481. @@ -609,8 +609,8 @@
  482. for(i = 0; i < clist.count; i++) {
  483. c = (icqcontact *) clist.at(i);
  484. - for(it = imevent::message; it != imevent::imeventtype_size; (int) it += 1) {
  485. - c->setsound(it, "");
  486. + for(it = imevent::message; it != imevent::imeventtype_size; it += 1) {
  487. + c->setsound((imevent::imeventtype)it, "");
  488. }
  489. }
  490. @@ -685,20 +685,20 @@
  491. suin.erase(0, i+1);
  492. imcontact ic;
  493. - protocolname pname;
  494. + int pname;
  495. - for(pname = icq; pname != protocolname_size && skey != getprotocolname(pname); (int) pname += 1);
  496. + for(pname = icq; pname != protocolname_size && skey != getprotocolname((protocolname)pname); pname += 1);
  497. if(pname != protocolname_size) {
  498. if(suin == "*") {
  499. for(i = 0; i < clist.count; i++) {
  500. c = (icqcontact *) clist.at(i);
  501. - if(c->getdesc().pname == pname) c->setsound(it, buf);
  502. + if(c->getdesc().pname == pname) c->setsound((imevent::imeventtype)it, buf);
  503. }
  504. } else {
  505. - if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), pname);
  506. - else ic = imcontact(suin, pname);
  507. + if(pname == icq) ic = imcontact(strtoul(suin.c_str(), 0, 0), (protocolname)pname);
  508. + else ic = imcontact(suin, (protocolname)pname);
  509. c = clist.get(ic);
  510. }
  511. @@ -708,7 +708,7 @@
  512. c = clist.get(contactroot);
  513. }
  514. - if(c) c->setsound(it, buf);
  515. + if(c) c->setsound((imevent::imeventtype)it, buf);
  516. }
  517. fi.close();
  518. @@ -1003,18 +1003,18 @@
  519. }
  520. imstatus icqconf::getstatus(protocolname pname) {
  521. - imstatus st = available;
  522. + int st = available;
  523. map<string, string>::iterator ia;
  524. imaccount a = getourid(pname);
  525. if((ia = a.additional.find("status")) != a.additional.end()) {
  526. if(!ia->second.empty()) {
  527. - for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; (int) st += 1);
  528. + for(st = offline; st != imstatus_size && imstatus2char[st] != ia->second[0]; st += 1);
  529. if(st == imstatus_size) st = available;
  530. }
  531. }
  532. - return st;
  533. + return (imstatus)st;
  534. }
  535. void icqconf::savestatus(protocolname pname, imstatus st) {
  536. @@ -1099,8 +1099,8 @@
  537. << "Written by Konstantin Klyagin." << endl
  538. << "Built-in protocols are:";
  539. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  540. - if(gethook(pname).enabled()) cout << " " << conf.getprotocolname(pname);
  541. + for(int pname = icq; pname != protocolname_size; pname += 1)
  542. + if(gethook((protocolname)pname).enabled()) cout << " " << conf.getprotocolname((protocolname)pname);
  543. cout << endl << endl
  544. << "This is free software; see the source for copying conditions. There is NO" << endl
  545. @@ -1150,11 +1150,11 @@
  546. }
  547. cdest = imcontact(strtoul(dest.c_str(), 0, 0), icq);
  548. } else {
  549. - protocolname pname;
  550. + int pname;
  551. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  552. - if(getprotocolname(pname) == proto) {
  553. - cdest = imcontact(dest, pname);
  554. + for(pname = icq; pname != protocolname_size; pname += 1) {
  555. + if(getprotocolname((protocolname)pname) == proto) {
  556. + cdest = imcontact(dest, (protocolname)pname);
  557. break;
  558. }
  559. }
  560. @@ -1212,16 +1212,16 @@
  561. }
  562. void icqconf::externalstatuschange(char st, const string &proto) const {
  563. - imstatus imst;
  564. - protocolname pname;
  565. + int imst;
  566. + int pname;
  567. if(st) {
  568. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  569. - if(getprotocolname(pname) == proto)
  570. + for(pname = icq; pname != protocolname_size; pname += 1)
  571. + if(getprotocolname((protocolname)pname) == proto)
  572. break;
  573. - for(imst = offline; imst != imstatus_size; (int) imst += 1)
  574. + for(imst = offline; imst != imstatus_size; imst += 1)
  575. if(imstatus2char[imst] == st)
  576. break;
  577. @@ -1317,16 +1317,16 @@
  578. void icqconf::initmultiproto(bool p[], string buf, bool excludenochat) {
  579. string w;
  580. - protocolname pname;
  581. + int pname;
  582. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  583. + for(pname = icq; pname != protocolname_size; pname += 1)
  584. p[pname] = buf.empty();
  585. while(!(w = getword(buf)).empty()) {
  586. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  587. - if(getprotocolname(pname) == w) {
  588. + for(pname = icq; pname != protocolname_size; pname += 1) {
  589. + if(getprotocolname((protocolname)pname) == w) {
  590. if(excludenochat) {
  591. - p[pname] = !gethook(pname).getCapabs().count(hookcapab::nochat);
  592. + p[pname] = !gethook((protocolname)pname).getCapabs().count(hookcapab::nochat);
  593. } else {
  594. p[pname] = true;
  595. }
  596. --- ./src/icqcontact.cc.orig 2004-04-11 19:32:27.000000000 +0300
  597. +++ ./src/icqcontact.cc 2004-05-04 12:29:40.598254376 +0300
  598. @@ -48,8 +48,10 @@
  599. finlist = true;
  600. congratulated = false;
  601. - for(ie = imevent::message; ie != imevent::imeventtype_size; (int) ie += 1)
  602. - sound[ie] = "";
  603. + int int_ie;
  604. + for(int_ie = imevent::message; int_ie != imevent::imeventtype_size; int_ie += 1)
  605. + sound[(imevent::imeventtype)int_ie] = "";
  606. + ie = (imevent::imeventtype)int_ie;
  607. cdesc = adesc;
  608. --- ./src/icqdialogs.cc.orig 2004-04-01 11:01:13.000000000 +0300
  609. +++ ./src/icqdialogs.cc 2004-05-04 12:40:26.961992152 +0300
  610. @@ -174,13 +174,13 @@
  611. imsearchparams ts;
  612. if(subj != fsrss) {
  613. - for(protocolname apname = icq; apname != protocolname_size; (int) apname += 1) {
  614. + for(int apname = icq; apname != protocolname_size; apname += 1) {
  615. if(subj == fschannel)
  616. - if(!gethook(apname).getCapabs().count(hookcapab::conferencing))
  617. + if(!gethook((protocolname)apname).getCapabs().count(hookcapab::conferencing))
  618. continue;
  619. - if(gethook(apname).logged() || apname == infocard) {
  620. - penabled.push_back(apname);
  621. + if(gethook((protocolname)apname).logged() || apname == infocard) {
  622. + penabled.push_back((protocolname)apname);
  623. }
  624. }
  625. @@ -937,8 +937,8 @@
  626. m.setwindow(textwindow(4, LINES-8, 20, LINES-4, conf.getcolor(cp_dialog_menu)));
  627. m.idle = &menuidle;
  628. - for(imgender i = genderUnspec; i != imgender_size; (int) i += 1) {
  629. - m.additemf(0, (int) i, " %s", strgender(i));
  630. + for(int i = genderUnspec; i != imgender_size; i += 1) {
  631. + m.additemf(0, i, " %s", strgender((imgender)i));
  632. if(i == f) m.setpos(m.getcount()-1);
  633. }
  634. @@ -953,13 +953,13 @@
  635. m.setwindow(textwindow(4, LINES-8, 18, LINES-3, conf.getcolor(cp_dialog_menu)));
  636. m.idle = &menuidle;
  637. - for(ICQ2000::AgeRange i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; (int) i += 1) {
  638. - const char *p = stragerange(i);
  639. + for(int i = ICQ2000::RANGE_NORANGE; i <= ICQ2000::RANGE_60_ABOVE; i += 1) {
  640. + const char *p = stragerange((ICQ2000::AgeRange)i);
  641. if(i == ICQ2000::RANGE_NORANGE)
  642. p = _("none");
  643. - m.additemf(0, (int) i, " %s", p);
  644. + m.additemf(0, i, " %s", p);
  645. if(i == r) m.setpos(m.getcount()-1);
  646. }
  647. @@ -1071,14 +1071,14 @@
  648. }
  649. void icqface::multichange(bool conv[], bool newstate) {
  650. - protocolname pname;
  651. + int pname;
  652. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  653. - if((!conf.getourid(pname).empty() || pname == rss) && conv[pname]) break;
  654. + for(pname = icq; pname != protocolname_size; pname += 1)
  655. + if((!conf.getourid((protocolname)pname).empty() || pname == rss) && conv[pname]) break;
  656. if(pname == protocolname_size || !newstate) {
  657. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  658. - if(!conf.getourid(pname).empty() || pname == rss)
  659. + for(pname = icq; pname != protocolname_size; pname += 1)
  660. + if(!conf.getourid((protocolname)pname).empty() || pname == rss)
  661. conv[pname] = newstate;
  662. }
  663. }
  664. @@ -1086,7 +1086,7 @@
  665. bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) {
  666. bool finished, success, hasany;
  667. int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
  668. - protocolname pname;
  669. + int pname;
  670. string tmp, phidden;
  671. string smtp = conf.getsmtphost() + ":" + i2str(conf.getsmtpport());
  672. @@ -1134,15 +1134,15 @@
  673. bool chatmode[protocolname_size], conv[protocolname_size],
  674. entersends[protocolname_size], nonimonline[protocolname_size];
  675. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  676. - chatmode[pname] = conf.getchatmode(pname);
  677. - entersends[pname] = conf.getentersends(pname);
  678. - conv[pname] = conf.getcpconvert(pname);
  679. - nonimonline[pname] = conf.getnonimonline(pname);
  680. + for(pname = icq; pname != protocolname_size; pname += 1) {
  681. + chatmode[pname] = conf.getchatmode((protocolname)pname);
  682. + entersends[pname] = conf.getentersends((protocolname)pname);
  683. + conv[pname] = conf.getcpconvert((protocolname)pname);
  684. + nonimonline[pname] = conf.getnonimonline((protocolname)pname);
  685. }
  686. - for(hasany = false, pname = icq; pname != protocolname_size && !hasany; (int) pname += 1)
  687. - hasany = !conf.getourid(pname).empty();
  688. + for(hasany = false, pname = icq; pname != protocolname_size && !hasany; pname += 1)
  689. + hasany = !conf.getourid((protocolname)pname).empty();
  690. dialogbox db;
  691. @@ -1184,10 +1184,10 @@
  692. i = t.addnode(_(" Codepages conversion "));
  693. - for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
  694. + for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
  695. if(conv[pname])
  696. - if(!conf.getourid(pname).empty() || pname == rss)
  697. - tmp += conf.getprotocolname(pname) + " ";
  698. + if(!conf.getourid((protocolname)pname).empty() || pname == rss)
  699. + tmp += conf.getprotocolname((protocolname)pname) + " ";
  700. t.addleaff(i, 0, 26, _(" Switch to language preset : %s "), iconvlang->c_str());
  701. t.addleaff(i, 0, 27, _(" Convert from : %s "), convertfrom.c_str());
  702. @@ -1207,15 +1207,15 @@
  703. t.addleaff(i, 0, 7, _(" Edit away message on status change : %s "), stryesno(askaway));
  704. if(hasany) {
  705. - for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
  706. - if(chatmode[pname] && !conf.getourid(pname).empty())
  707. - tmp += conf.getprotocolname(pname) + " ";
  708. + for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
  709. + if(chatmode[pname] && !conf.getourid((protocolname)pname).empty())
  710. + tmp += conf.getprotocolname((protocolname)pname) + " ";
  711. t.addleaff(i, 0, 16, _(" Chat messaging mode for : %s"), tmp.c_str());
  712. - for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
  713. - if(entersends[pname] && !conf.getourid(pname).empty())
  714. - tmp += conf.getprotocolname(pname) + " ";
  715. + for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
  716. + if(entersends[pname] && !conf.getourid((protocolname)pname).empty())
  717. + tmp += conf.getprotocolname((protocolname)pname) + " ";
  718. t.addleaff(i, 0, 25, _(" Enter key sends message for : %s"), tmp.c_str());
  719. @@ -1225,8 +1225,8 @@
  720. }
  721. - for(tmp = "", pname = icq; pname != protocolname_size; (int) pname += 1)
  722. - if(nonimonline[pname]) tmp += conf.getprotocolname(pname) + " ";
  723. + for(tmp = "", pname = icq; pname != protocolname_size; pname += 1)
  724. + if(nonimonline[pname]) tmp += conf.getprotocolname((protocolname)pname) + " ";
  725. t.addleaff(i, 0, 29, _(" Always online non-IM contacts for : %s"), tmp.c_str());
  726. @@ -1272,7 +1272,7 @@
  727. break;
  728. case 3:
  729. if(hasany) selectproto(conv, spIMplusRSS); else
  730. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  731. + for(pname = icq; pname != protocolname_size; pname += 1)
  732. conv[pname] = !conv[pname];
  733. break;
  734. case 4:
  735. @@ -1264,7 +1264,7 @@
  736. case 15: mailcheck = !mailcheck; break;
  737. case 16:
  738. if(hasany) selectproto(chatmode); else
  739. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  740. + for(pname = icq; pname != protocolname_size; pname += 1)
  741. chatmode[pname] = !chatmode[pname];
  742. break;
  743. @@ -1328,7 +1328,7 @@
  744. break;
  745. case 25:
  746. if(hasany) selectproto(entersends); else
  747. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  748. + for(pname = icq; pname != protocolname_size; pname += 1)
  749. entersends[pname] = !entersends[pname];
  750. break;
  751. case 26:
  752. @@ -1381,13 +1381,13 @@
  753. conf.setaskaway(askaway);
  754. conf.setcharsets(convertfrom, convertto);
  755. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  756. - conf.setchatmode(pname, chatmode[pname]);
  757. - conf.setentersends(pname, entersends[pname]);
  758. - conf.setnonimonline(pname, nonimonline[pname]);
  759. + for(pname = icq; pname != protocolname_size; pname += 1) {
  760. + conf.setchatmode((protocolname)pname, chatmode[pname]);
  761. + conf.setentersends((protocolname)pname, entersends[pname]);
  762. + conf.setnonimonline((protocolname)pname, nonimonline[pname]);
  763. bool bconv = conv[pname] && (!convertfrom.empty() || !convertto.empty());
  764. - conf.setcpconvert(pname, bconv || !hasany);
  765. + conf.setcpconvert((protocolname)pname, bconv || !hasany);
  766. }
  767. conf.setbidi(bidi);
  768. @@ -1419,17 +1419,17 @@
  769. int i, protmax;
  770. bool r, finished = false;
  771. - protocolname pname;
  772. + int pname;
  773. protocolname tempprots[protocolname_size];
  774. bool aprots[protocolname_size];
  775. i = 0;
  776. memcpy(aprots, prots, sizeof(aprots));
  777. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  778. + for(pname = icq; pname != protocolname_size; pname += 1) {
  779. if(mode == spnonIM) {
  780. if(pname != infocard)
  781. - if(!gethook(pname).getCapabs().count(hookcapab::nochat))
  782. + if(!gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
  783. continue;
  784. if(pname == livejournal)
  785. @@ -1438,19 +1438,19 @@
  786. } else {
  787. if(mode != spIMplusRSS || pname != rss)
  788. if(pname != livejournal || mode == spIMonly) {
  789. - if(gethook(pname).getCapabs().count(hookcapab::nochat))
  790. + if(gethook((protocolname)pname).getCapabs().count(hookcapab::nochat))
  791. continue;
  792. - if(conf.getourid(pname).empty())
  793. + if(conf.getourid((protocolname)pname).empty())
  794. continue;
  795. }
  796. - if(!gethook(pname).enabled())
  797. + if(!gethook((protocolname)pname).enabled())
  798. continue;
  799. }
  800. - tempprots[i++] = pname;
  801. + tempprots[i++] = (protocolname)pname;
  802. }
  803. protmax = i;
  804. --- ./src/icqface.cc.orig 2004-04-11 19:32:28.000000000 +0300
  805. +++ ./src/icqface.cc 2004-05-04 13:29:21.551866680 +0300
  806. @@ -205,16 +205,16 @@
  807. void icqface::showtopbar() {
  808. string buf;
  809. - protocolname pname;
  810. + int pname;
  811. icqconf::imaccount ia;
  812. - for(pname = icq; pname != protocolname_size; (int) pname += 1) {
  813. - ia = conf.getourid(pname);
  814. + for(pname = icq; pname != protocolname_size; pname += 1) {
  815. + ia = conf.getourid((protocolname)pname);
  816. if(!ia.empty()) {
  817. buf += " ";
  818. - buf += conf.getprotocolname(pname) + ":";
  819. - buf += imstatus2char[gethook(pname).getstatus()];
  820. + buf += conf.getprotocolname((protocolname)pname) + ":";
  821. + buf += imstatus2char[gethook((protocolname)pname).getstatus()];
  822. // buf += ">";
  823. }
  824. }
  825. @@ -1305,7 +1305,7 @@
  826. void icqface::makeprotocolmenu(verticalmenu &m) {
  827. icqconf::imaccount ia;
  828. - protocolname ipname;
  829. + int ipname;
  830. static const string pitems[protocolname_size] = {
  831. _(" [icq] ICQ network"),
  832. @@ -1320,11 +1320,11 @@
  833. ""
  834. };
  835. - for(ipname = icq; ipname != protocolname_size; (int) ipname += 1) {
  836. - ia = conf.getourid(ipname);
  837. + for(ipname = icq; ipname != protocolname_size; ipname += 1) {
  838. + ia = conf.getourid((protocolname)ipname);
  839. if(!ia.empty()) {
  840. - m.additem(0, ipname, pitems[ipname]);
  841. + m.additem(0, (protocolname)ipname, pitems[ipname]);
  842. }
  843. }
  844. }
  845. @@ -1336,20 +1336,21 @@
  846. vector<imstatus> mst;
  847. vector<imstatus>::iterator im;
  848. - protocolname pname, onechoice;
  849. + int pname;
  850. + protocolname onechoice;
  851. m.setwindow(textwindow(sizeWArea.x1, sizeWArea.y1, sizeWArea.x1+27,
  852. sizeWArea.y1+9, conf.getcolor(cp_main_text)));
  853. m.idle = &menuidle;
  854. - for(protcount = 0, pname = icq; pname != protocolname_size; (int) pname += 1) {
  855. - if(!conf.getourid(pname).empty()) {
  856. + for(protcount = 0, pname = icq; pname != protocolname_size; pname += 1) {
  857. + if(!conf.getourid((protocolname)pname).empty()) {
  858. protcount++;
  859. - onechoice = pname;
  860. + onechoice = (protocolname)pname;
  861. }
  862. - alrlogged = alrlogged || gethook(pname).getstatus() != offline;
  863. + alrlogged = alrlogged || gethook((protocolname)pname).getstatus() != offline;
  864. }
  865. if(protcount < 2) {
  866. @@ -1372,15 +1370,15 @@
  867. if(r = i) {
  868. switch(choice) {
  869. case -1:
  870. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  871. - if(!conf.getourid(pname).empty())
  872. - pnames.push_back(pname);
  873. + for(pname = icq; pname != protocolname_size; pname += 1)
  874. + if(!conf.getourid((protocolname)pname).empty())
  875. + pnames.push_back((protocolname)pname);
  876. break;
  877. case -2:
  878. - for(pname = icq; pname != protocolname_size; (int) pname += 1)
  879. - if(!conf.getourid(pname).empty())
  880. - if(gethook(pname).getstatus() != offline)
  881. - pnames.push_back(pname);
  882. + for(pname = icq; pname != protocolname_size; pname += 1)
  883. + if(!conf.getourid((protocolname)pname).empty())
  884. + if(gethook((protocolname)pname).getstatus() != offline)
  885. + pnames.push_back((protocolname)pname);
  886. break;
  887. default:
  888. pnames.push_back((protocolname) choice);
  889. @@ -1658,9 +1659,9 @@
  890. set<protocolname> ps;
  891. if(cs == csvisible || cs == csinvisible) {
  892. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  893. - if(gethook(pname).getCapabs().count(hookcapab::visibility))
  894. - ps.insert(pname);
  895. + for(int pname = icq; pname != protocolname_size; pname += 1)
  896. + if(gethook((protocolname)pname).getCapabs().count(hookcapab::visibility))
  897. + ps.insert((protocolname)pname);
  898. }
  899. lst.fillmenu(db.getmenu(), cs);
  900. --- ./src/icqgroup.cc.orig 2003-11-22 21:14:33.000000000 +0200
  901. +++ ./src/icqgroup.cc 2004-05-04 13:30:37.417333376 +0300
  902. @@ -82,6 +82,6 @@
  903. string oldname = name;
  904. name = aname;
  905. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1)
  906. - gethook(pname).renamegroup(oldname, name);
  907. + for(int pname = icq; pname != protocolname_size; pname += 1)
  908. + gethook((protocolname)pname).renamegroup(oldname, name);
  909. }
  910. --- ./src/imevents.cc.orig 2004-04-11 19:32:28.000000000 +0300
  911. +++ ./src/imevents.cc 2004-05-04 13:24:29.099326224 +0300
  912. @@ -62,11 +62,11 @@
  913. }
  914. imevent::imeventtype imevent::gettype() const {
  915. - return type;
  916. + return (imevent::imeventtype)type;
  917. }
  918. imevent::imdirection imevent::getdirection() const {
  919. - return direction;
  920. + return (imevent::imdirection)direction;
  921. }
  922. imcontact imevent::getcontact() const {
  923. @@ -111,14 +111,14 @@
  924. if(rdbuf == "\f")
  925. getstring(f, rdbuf);
  926. - for(direction = incoming; direction != imdirection_size; (int) direction += 1)
  927. + for(direction = incoming; direction != imdirection_size; direction += 1)
  928. if(sdirection[direction] == rdbuf) break;
  929. getstring(f, rdbuf);
  930. type = imeventtype_size;
  931. if(rdbuf != "") {
  932. - for(type = message; type != imeventtype_size; (int) type += 1)
  933. + for(type = message; type != imeventtype_size; type += 1)
  934. if(seventtype[type] == rdbuf) break;
  935. }
  936. --- ./src/imevents.h.orig 2004-02-21 18:15:05.000000000 +0200
  937. +++ ./src/imevents.h 2004-05-04 13:19:30.965649432 +0300
  938. @@ -30,8 +30,8 @@
  939. protected:
  940. imcontact contact;
  941. - imeventtype type;
  942. - imdirection direction;
  943. + int type;
  944. + int direction;
  945. time_t senttimestamp;
  946. time_t timestamp;
  947. --- ./src/imexternal.cc.orig 2004-03-20 18:49:08.000000000 +0200
  948. +++ ./src/imexternal.cc 2004-05-04 12:42:57.835055960 +0300
  949. @@ -393,20 +393,20 @@
  950. if(param == "event") {
  951. while(!(param = getword(buf)).empty()) {
  952. - for(imevent::imeventtype et = imevent::message; et != imevent::imeventtype_size; (int) et += 1) {
  953. - if((param == geteventname(et))
  954. + for(int et = imevent::message; et != imevent::imeventtype_size; et += 1) {
  955. + if((param == geteventname((imevent::imeventtype)et))
  956. || (param == "all")) {
  957. - event.insert(et);
  958. + event.insert((imevent::imeventtype)et);
  959. }
  960. }
  961. }
  962. } else if(param == "proto") {
  963. while(!(param = getword(buf)).empty()) {
  964. - for(protocolname pname = icq; pname != protocolname_size; (int) pname += 1) {
  965. - if((param == conf.getprotocolname(pname))
  966. + for(int pname = icq; pname != protocolname_size; pname += 1) {
  967. + if((param == conf.getprotocolname((protocolname)pname))
  968. || (param == "all")) {
  969. - proto.insert(pname);
  970. + proto.insert((protocolname)pname);
  971. }
  972. }
  973. }