This plugin with module allow you to add ICQ/AIM ability to your server.
- Players can send ICQ message to admin(s) thru say command.
- Admins can display message in server chat by sending ICQ message, or execute commands on server console (adminicq_allowexec should be set to 1).
- You can use ICQBot module to write your own ICQ message processing plugin.
- Also works with AIM (use screen names instead of UINs).
This plugin was written with FFAC plugin in mind (https://forums.alliedmods.net/showthread.php?t=55900
), so default trigger to send message on ICQ is !admin, but you can change it to what ever you want.
Module was written under AMXX 1.8.0 SDK, but I use it on server with AMXX 1.8.1. Tested on Windows and Linux HLDM dedicated servers.
For ICQ protocol implementation I used AOL AIM Custom Client SDK version 1.6.8 (http://dev.aol.com/aim/sdk
). This was most fast way to get ICQ functionality. But if someone will point me to good OpenSource ICQ library I will try to switch to it.
How to setup:
- Files from acclib folder place in Windows\system32 folder or near hlds.exe (the just simple should be in app folder or in folders that are in PATH system variable). On Lunix systems place near hlds_run or where server could load it. This is necessary and sufficient part of AOL SDK libraries.
- icqbot_amxx.dll (icqbot_amxx_i386.so for Linux) should be placed in amxmodx\modules folder.
- adminicq.amxx should be placed in amxmodx\plugins folder.
- Add adminicq.amxx string at the end of plugins.ini.
- You should have registered ICQ account for use on server. You can prepare account for use (with some other ICQ client): enable option "All users can add me to their contact list without authorization" or add desired admins to contact list and ask them for authorization (when this is not obligatory, this will allow admins to watch the server is running and help server to bypass admin's ICQ client antispam protection if any).
- Under Windows you may need to install msvcr71.dll (attached in "Windows msvcr71.zip" archive). Place it in Windows\System32 folder or near hlds.exe.
- Under Linux you must have libnspr4 and libnss3 packages installed.
- Also under Linux you should: create symbolic links to nss and nspr libs near hlsd_run. You can use those commands to do this (tested on debian, on it you should have libnspr4-0d and nss3-0d packages installed):
ln -s /usr/lib/libnspr4.so.0d libnspr4.so
ln -s /usr/lib/libnss3.so.0d libnss3.so
ln -s /usr/lib/xulrunner/libnssckbi.so libnssckbi.so
ln -s /usr/lib/libplc4.so.0d libplc4.so
ln -s /usr/lib/libplds4.so.0d libplds4.so
ln -s /usr/lib/libsmime3.so.0d libsmime3.so
ln -s /usr/lib/libsoftokn3.so.0d libsoftokn3.so
ln -s /usr/lib/libssl3.so.0d libssl3.so
Also this library is used, but link to it is not needed (doesn't know why), anyway you can create it too:
ln -s /usr/lib/xulrunner/libfreebl3.so libfreebl3.so
You should set in server.cfg:
adminicq_admins "admin_ICQ_number;another_admin_ICQ_numbe r"
// for example
// icqbot_uin "123456789"
// icqbot_pass "fd2$terf"
// adminicq_admins "123456;987654"
Also you can set in server.cfg:
adminicq_trigger "!admin" // 31 char max. Default is "!admin". If empty (""), players can't send administrative alert. Notification is also will not be displayed.
adminicq_showinfo 1 // show notification that players can send ICQ message to admin. Default is 1.
adminicq_flood_time 600 // time range (in seconds) in which player can send 4 messages to admin (flood protection). Default is 600.
adminicq_allowexec 0 // If 1 allow execution of commands received thru ICQ, otherwise if 0 just say text to all users. Default is 0.
There are some limitations on messages length:
- message received by module is truncated to 1023 chars before calling forward function in plugin.
- when you are in say mode (adminicq_allowexec 0) you can say no more than 63 chars. I.e. all after this is lost. Also only first row in message is displayed (Upto 63 chars or carriage return).
- when you are in admin mode (adminicq_allowexec 1) only one command allowed in one message (others are skipped). Command will be truncated to 63 chars.
To prevent futher questions why this plugin is needed when there is one already (FFAC ICQ bot). Let's I describe the conceptions:
1. FFAC ICQ bot:
User type "!admin message".
Plugin catch say event. Then it check for "!admin" string if it is, plugin prepare next info: admin ICQ, message, and send this info by UDP packet to predefined master server.
Master server is running special program that waits such UDP packets and, when receives, it send an ICQ message to specified admin ICQ.
2. AdminICQ plugin:
Special module on HL server starts ICQ client using icqbot_uin and icqbot_pass "CVARs" information (they are not really CVARs, but this is not important).
User type "!admin message".
Plugin catch say event. Then it check for "!admin" string if it is, plugin call for module running ICQ client send message to specified admin ICQ.
ICQ Client running in separate thread on HL server send message.
Next to do:
- User messages processing: subscribing on in game events, such as notification about your friend is come to play on server, your faivorite map is started and so on.
Change log for plugin:
[!]Fixed: if no rcon password specified it will be set to random value on execution time of the command.
[!]Fixed: character escaping is now correct in message sended to admin on trigger.
[!]Changed: CVAR changed from adminicq_sendto to adminicq_admins!
[+]Added: now commands in execute mode (adminicq_allowexec 1) are executed thru rcon and output of command is sent back to admin. If execution thru rcon is unsuccessfull command is executed directly in console and admin receive no output.
[!]Fixed: added trimming of uins before comparing in admins check.
[!]Fixed: message in say mode (adminicq_allowexec 0) is now truncated to 63 chars. In previous version if message exceeded 514 chars server can't say it.
[!]Fixed: if adminicq_trigger is empty ("") players can't send administrative alerts, but notification about AdminICQ is displayed to them. Now notification will not be displayed if adminicq_trigger is empty ("").
[+]Added: server can receive messages via ICQ client and execute them on server console as commands if adminicq_allowexec set to 1 or just display message to all players if adminicq_allowexec set to 0 (default behaviour).
[+]Added: new CVAR adminicq_allowexec. Default 0. If 0 first string from message will be displayed to all players in chat area (simply say command at server console), otherwise (if 1) execute each row of message as command at server console.
[!]Fixed: ICQ client goes offline on map change.
Change log for module:
[!]Fixed: on fast machines messages could be sent to last specified admin if there is more than one admin specified.
1.5 (downloaded: windows: 128, linux: 73)
[!]Fixed: if ICQ goes offline somehow it will try to reconnect.
[!]New: Linux version released.
[!]Changed: jgtktlk.dll and sipXtapi.dll are removed from acclib.zip (now Windows acclib.zip) because they are unneeded.
[!]Changed: icqbot.amxx and icqbot.sma are removed because functionality of this plugin now moved into module.
[!]Changed: incoming message truncation lenght reduced to 1023.
[+]Added: server can receive messages via ICQ client.
[!]Fixed: ICQ client goes offline on map change.
You need to download acclib.zip and ICQBot.zip apropriate to your system type and AdminICQ.zip. SMA files was not included on the page because they reference INC file, so they all reside in archives. You should redownload only AdminICQ and ICQBot.zip archives on version changes, acclib.zip will not change unless specified.
You don't need to download "ICQBot Module Source.zip" because this is source for module.