Sabtu, 30 Oktober 2010

Erlang Bot

Tidak banyak informasi yang gw dapet tentang bot erlang ini. ato bisa dibilang bot ini kurang terkenal diantara jenis bot di jabber client. tapi jika temen2 berminat mengoleksi bot2 jabber. tidak ada salahnya mencoba run bot erlang ini.

Untuk bisa menjalankan bot erlang ini di windows ada 2 komponen yang dibutuhkan yaitu file bot (erl-bot) dan software erlang. jika temen2 belum punya software erlang for windows bisa download Disini (jangan kaget file nya 57MB). siapin kopi + rokok buat nunggu download selesai. kalo belum selesai juga tinggal tidur juga ga papa,xixixi.


Langkah-langkahnya sebagai berikut:

1. Install software erlang yang sudah didownload tadi.
2. Download file erl-bot Disini (jika belum punya). kemudian extract
3. Folder hasil extract rename jadi 'erl-bot' dan taruh ditempat kamu suka (exp: c:\erl-bot atau d:\erl-bot)
4. Buka folder erl-bot dan cari folder static
5. Buka foder static, cari file yang bernama 'configure.cfg', buka pakai Notepad
Isinya sebagai berikut:
%%%    ======================================================================== %%%
%%% Coding: utf-8                                                            %%%
%%%                                                                          %%%
%%% configure.hrl  "Confugure file"                                          %%%
%%%                                                                          %%%
%%% Copyright (C) 2009 Mihailov Artem                                        %%%
%%%                                                                          %%%
%%% This program is free software: you can redistribute it and/or modify it  %%%
%%%    under the terms of the GNU General Public License as published by the    %%%
%%%    Free Software Foundation, either version 3 of the License, or (at your   %%%
%%%    option) any later version.                                               %%%
%%%                                                                          %%%
%%% This program is distributed in the hope that it will be useful, but      %%%
%%%    WITHOUT ANY WARRANTY; without even the implied warranty of               %%%
%%%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General %%%
%%%    Public License for more details.                                         %%%
%%%                                                                          %%%
%%% You should have received a copy of the GNU General Public License along  %%%
%%%    with this program. If not, see <http://www.gnu.org/licenses/>.           %%%
%%% ======================================================================== %%%

%%%%%%%%%%%%%%%%%%%%%%%% Parameters connection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%{"HOST","server_bot_kamu"}.              % host, uncomment if necessary

%{"PORT",5222}.            % port (default: 5222), uncomment if necessary

%{"CONNECT METHOD",tcp}.   % method connection (default: tcp)
                           % (parameters: zlib,tls,tcp), uncomment if necessary

%%%%%%%%%%%%%%%%%%%%%%%% Parameters certificate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%{"CACERTFILE","./static/sertificate/cacert.pem"}.  % CA certificate file, path
                                                    % (/usr/local/data/file.pem)
                                                    % uncomment if necessary

%{"CERTFILE","/static/sertificate/cacert.pem"}.     % certificate file, path
                                                    % (/usr/local/data/file.pem)
                                                    % uncomment if necessary

%{"KEYFILE","./static/sertificate/key.pem"}.        % key file, path
                                                    % (/usr/local/data/key.pem)
                                                    % uncomment if necessary
                          
%%%%%%%%%%%%%%%%%%%%%%%% Parameters authorization %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"ACCOUNT","jid_bot@server_bot/resource_bot"}.  % Account user (test@server/resource)

{"PASSWORD","password_bot"}.           % Password user (123456)

%{"AUTH METHOD",plain}.    % Method authorization to server (default: plain)
                           % (parameters: plain, plaintext, digest)
                           % uncomment if necessary
                          
%%%%%%%%%%%%%%%%%%%%%%%% Parameters reconnection bot %%%%%%%%%%%%%%%%%%%%%%%%%%

{"RECONNECT",9999999}.           % number of attempts

{"TIMEOUT",5000}.          % time between reconection
                          
%%%%%%%%%%%%%%%%%%%%%%%%%% Paramerters Admins Bot %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"ADMINS",["jid_kamu@server_kamu"]}. % Enter JID admin bot

%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameters conference %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                          
{"NICK","nick_bot"}.        % Nickname bot

{"SIMBOL","_"}.            % Simbol pluse nick

{"MAXCHARS","10000"}.      % Max chars

{"MAXSTANZAS","10"}.       % Max stanzas

{"MAXCOUNT",400}.          % Max count simbol in message
                          
%%%%%%%%%%%%%%%%%%%% Parameters status, show, priority %%%%%%%%%%%%%%%%%%%%%%%%

{"STATUS","status_bot"}. % Status text

{"SHOW","online/dnd/xa/away/chat"}.         % Show in network (online, dnd, xa, away, chat,
                           % invisible)
                          
{"PRIORITY","100"}.        % Parameters priority (0 .... 100)

%%%%%%%%%%%%%%%%%%%%%%% Parameters auto changed status %%%%%%%%%%%%%%%%%%%%%%%%

{"AUTO STATUS",true}.      % Auto changed status (true or false)
                           % Is options action start bot
                           % restart is required to run the bot
                          
{"AUTO TIME STATUS",300000}. % Time auto status
                             % Parameters = millisecond
                             % 300000 millisecond = 5 minute

{"ACTION STATUS",all}.     % Action auto status
                           % all - changed all
                           % global - changed only in roster
                           % local - changed only in conference

{"CHANGED STATUS",all}.    % Changed status
                           % all - ever changed
                           % cmd - only command
                           % msg - only message

{"AUTO REACT MSG","chat"}. % react type message
                           % all, "groupchat", "chat"

{"ASTATUS","Я тестюсь... {Я бездействую с %DATE% %TIME%}"}.
                           % Status text
                           % '%TIME%' - is show time shanged status
                           % '%DATE%' - is show date changed status

{"ASHOW","xa"}.            % Show in network (online, xa, dnd, away, chat,
                           % invisible)

{"APRIORITY","59"}.        % Priority (0 .... 100)

%%%%%% Parameters debug, error and write debug and error messages XMPP %%%%%%%%

%{"DEBUG",true}.           % debug print (default: false)
                           % uncomment if necessary and true
                          
%{"ERROR",true}.           % error print (default: false)
                           % uncomment if necessary and true
                          
%{"WRITE DEBUG",true}.     % write debug message (default: false)
                           % uncomment if necessary and true
                          
{"WRITE ERROR",true}.      % write error message (default: false)
                           % uncomment if necessary and true
                          
%%%%%%%%%%%%%%%%%%%% Parameters write error messages Bot %%%%%%%%%%%%%%%%%%%%%%%

{"WRITE BOT LOGS",true}.   % error message bot (true or false)

{"ERROR MESSAGE",true}.    % error message stanza (true or false)

%%%%%%%%%%%%%%%%%% Subscribe and UnSubscribe action Erl-Bot %%%%%%%%%%%%%%%%%%%%

{"SUBSCRIBE",{allow,admin}}.    % Subscribe {allow|deny,all|user|admin|action}
                                % allow - allow access and added in roster
                                % deny - deny access and rmove in roster
                                % all - allow or deny all user and admins
                                % admin - allow admin and added in roster
                                % action - not action(not added and not removed)

{"UNSUBSCRIBE",{remove,all}}.   % UnSubscribe {remove|action,all|user|admin}
                                % remove - delete in roster
                                % action - not action(not added and not removed)

%%%%%%%%%%%%%%%%%%%%%%%%%% Edit parameters Time Zone %%%%%%%%%%%%%%%%%%%%%%%%%%%

{"TZ","MSK GMT+8"}.        % Time Zone parameters, printing result time request

{"TIME ZONE","+8"}.        % Time Zone correct time server

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Default language bot %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"LANG","ru"}.             % Default language bot

%%%%%%%%%%%%%%%% Default conference join bot (is first start) %%%%%%%%%%%%%%%%%%

{"CONFERENCE",["room@conference.server.room"]}.

%%%%%%%%%%%%%%%%%%%%% Setting deny lookup disco commands %%%%%%%%%%%%%%%%%%%%%%%

{"DENY DISCO",["conference.jabber.ru"]}.   % Deny lookup conference

{"DISCO RESULT",10}.                       % Return result search conference

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameters directory %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"USER","./user"}.           % User files directory

{"DYNAMIC","./dynamic"}.     % Dinamic files directory

{"STATIC","./static"}.       % Static files directory

{"LOGS","./logs"}.           % Logs files directory

{"MSGS","./static/msgs"}.    % Path to msgs libraries

{"HELP","./static/help"}.    % Path to help files directory

{"PRIVATE","./html/private"}.% Path to logging private message

{"PUBLIC","./html/public"}.  % Path to logging public message

{"ADMIN","./html/admin"}.    % Path to logging admin (logging message and
                             % presence (show jid user and all parameters
                             % moderate conference))

{"FILTR","./static/filtr"}.  % Path to filtr files

%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameters vCard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"AUTO VCARD",false}.      % vCard auto fill when you start the bot
                           % (true or false)

{"NICKNAME","Erl-Bot"}.
{"FN","Erlang Bot"}.
{"BDAY","12.10.2008"}.
{"INTERNET","support@conference.a7x-im.com"}.
{"USERID","pixel@jabe.info"}.
{"EMAIL","pixel@jabe.info"}.
{"URL","support@conference.a7x-im.com"}.
{"DESC","Bot write erlang language programming."}.

{"IMAGE","./static/image/erl-bot.png"}. % image vCard, path

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Supported discovery %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{"DISCOVERY",["http://jabber.org/protocol/disco",
              "jabber:iq:version",
              "jabber:iq:time",
              "urn:xmpp:ping",
              "vcard-temp"]}.

%%%%%%%%%%%%%% Bot action, if it is driven out of the conference %%%%%%%%%%%%%%%

{"ACTION OUT",ask}.         % none - not action bot
                            % ask - request action admin
                            % del - leave bot in room and delete room in lists
                            % conference

{"MARK OUT",true}.          % mark conference if bot driven out (true or false):
                            % * - kiked
                            % ** - baned

{"MOD OUT",all}.            % moderate action
                            % all - kicked and banned
                            % kick - kicked
                            % ban - banned
                            % false - not action bot

%%%%%%%%%%%%%%%%%%% Logging message conference and privat %%%%%%%%%%%%%%%%%%%%%%

{"LOGGING",true}.           % Logging message and presence (true or false)
                            % Please setup directory logging (see above)

{"LOGGING STANZA",all}.     % Logging stanza type
                            % msg - only message logging
                            % prs - only prsence logging
                            % all - logging all stanza type

{"LOGGING TYPE",all}.       % Logging type stanza
                            % public - groupchat type
                            % private - chat type
                            % all - all type message

{"LOGGING ADMIN",true}.     % Logging admin (see above)

{"LOGGING STAMP",true}.     % Logging STAMP message (if restart bot or
                            % first start)

{"IMG LOGGING","/home/a7x/erl-bot/static/image/a7x-im.png"}.
                            % image logging web, path

%%%%%%%%%%%%%%%% Parameters filtr (default, is first start bot) %%%%%%%%%%%%%%%%

{"MAT MSG",true}.                           % Filter message (true | false)

{"MAT MSG ACTION",{kick,"Мат фильтр"}}.     % Action filter message and reason *

{"MAT NICK",true}.                          % Filter nick (true | false)

{"MAT NICK ACTION",{kick,"Мат фильтр"}}.    % Action filter nick and reason *

{"MAT STATUS",true}.                        % Filter status (true | false)

{"MAT STATUS ACTION",{kick,"Мат фильтр"}}.  % Action filter status and reason *

{"MSG",true}.                               % Filter large message (true|false)

{"MSG LIMIT",1000}.                         % Limit cout message (1 ... 5000) **

{"MSG ACTION",{kick,"Лимит символов в сообщении"}}. % Action limitator message *

{"PRS",true}.                               % Filter large nick (true | false)

{"PRS LIMIT",20}.                           % Limit count nick (1 ... 200) **

{"PRS ACTION",{kick,"Лимит символов в нике"}}.      % Action limitator presence *

{"FILTR SMILE",false}.                       % Filtr smiles

{"LIMIT SMILE",10}.                         % Limit smile one message (1 ... 100)

{"SMILE ACTION",{kick,"Фильтр смайлов"}}.   % Action smile *

{"SIMBOL NICK",false}.                       % Filtrate spec simbol nick

{"SPEC ACTION",{kick,"Ник фильтр"}}.        % Action spec nick *

{"CAPS",true}.                              % Filtrate caps message

{"CAPS PERCENT",70}.                        % Persent caps in message ***

{"CAPS ACTION",{kick,"Капс фильтр"}}.       % Action caps *

{"FILTR URL",true}.                         % Persent caps in message ***

{"FILTR URL ACTION",{kick,"URL фильтр"}}.   % Action caps *

{"FILTR STATUS",false}.                      % Filtr large status

{"FILTR STATUS LIMIT",100}.                 % Limit count symbol status **

{"FILTR STATUS ACTION",{kick,"Статус фильтр"}}.   % Action limitator status *

% * - parameters action and reason {Action,Reason}
% Action: kick, ban, visitor
% Reason: [] - if none reason or "text" - if reason "text"
% Default: {kick,"Filter"}
% ** - parameters limit, is integer or list. Record write 50 or "50"
% Default: msg: 1000, prs: 20, smile: 10, status: 100
% *** - percent caps 1 ... 100 %. Parameters is integer
% Default: 70

Note: Rubah bagian yang berwarna biru, sesuaikan dengan keinginan kamu. untuk clue lain, bisa dicoba bila sudah jalan. setelah selesai di edit, klik save.

6. Kembali ke folder erl-bot, untuk running bot, double klik file name 'erl.bot'.


Untuk jenis commands/perintah dipelajari sendiri atau bisa ditanyakan di room support kami:
programming@conference.jsmart.web.id
(Koreksi dapat ditulis di kotak komentar, bila ada kesalahan dalam tutorial diatas).

                                                      

Tidak ada komentar:

Posting Komentar