[ disclaimer ]
The following perl based programs are licensed under terms of the GNU General Public License Version 2 or later.
Please report bugs to: geeage@greyarea.de
|
|
ServerSpyIRC bot
|
|
|
[ go to:
- description
- version
- requirements
- download
- installation
- status/bugs
- functions
- menu - ]
- DESCRIPTION:
ServerSpyIRC is a bot for IRC, based on the perl Net::IRC module. It can show IRC users a lot of information
about Quake2, Quake3 and Halflife online servers, like status, players and clanwars.
The bot is still a beta version, use it at your own risk.
IMPORTANT: If you are looking for The Server Spy by
karmann, a powerfull administration and monitor windows program for Halflife mods like CS, TFC, DoD and DM, which
includes an IRC bot too, please visit: http://www.goonsquad.net/serverspy
LICENCE: ServerSpyIRC is free software; you can redistribute or
modify it under the terms of Perl's Artistic License or GGPL
HAFTUNGSAUSSCHLUSS(in german) Die vorliegende Software wird so zur Verfügung gestellt wie sie ist, es
werden keinerlei Garantien für ihre Eignung für welche Zwecke auch immer
abgegeben, und es wird auch keine Haftung für die durch ihre Verwendung
oder Nichtverwendbarkeit möglicherweise verursachten Schäden oder Ausfälle
oder dergleichen übernommen, selbst wenn dem Autor solche möglichen Folgen
bekannt sein oder bekannt gemacht werden sollten.
- VERSION:
0.7a
- REQUIREMENTS:
OS: POSIX
PL: PERL with module Net::IRC by Greg Bacon & Dennis Taylor
please use always the latest version of
Net::IRC (www.perl.com/CPAN);
version 0.70 is included in installationfile
- DOWNLOAD:
ServerSpyIRCV0.7a.tar.gz
- INSTALLATION:
INSTALL:
extract the ServerSpyVXX.tar.gz to a directory
change to this dir
you need the following perl modules:
Net::IRC
- included in the tar.gz file and used if no local module is available
Time::Local, Socket, Sys::Hostname, Getopt::Std
- all standard modules of PERL
CONFIG:
you must edit following files:
ServerSpyIRCVxx.pl
- edit the first line (if needed) with your path to PERL
ServerSpyIRC.cfg
- read and edit the CONFIG-section!
- most important: change the pathToServerSpy to correct dir
you can edit the startfile
./startSS
- starts the bot and kill old running bot(s)
- edit all variables to the correct paths and names
./killSSI
- kills all running bots
- edit all paths to the correct directory and names
./checkSSI
- starts bot if no bot is running
- 'running' means only the process, not the irc connection 8(
- edit all paths to the correct directory and names
bot uses following files for data:
(if you understand the syntax you can edit manually, if not use the bot ;)
ServerSpyIRC.user
- to add user
ServerSpyIRC.groups
- to add clans/groups
ServerSpyIRC.jobs
- to add jobs
for manually configuration only:
ServerSpyIRC.news
- to add news for user, display during login/auth
RUNNING:
ways to start the bot:
first time running: ServerSpyIRCVxx.pl
- with error output etc. in shell
nohup ServerSpyIRCVxx.pl > /dev/null 2>&1 &
- will launch the bot in the backround with no outputs to shell
./startSSI (if you have edited all paths!)
- will kill a runnig ServerSpy
- then starts a new one
./checkSSI (if you have edited all paths!)
- starts new bot if no 'old' is running
- STATUS/BUGS:
- known problems:
-> no 100% protection of EXCESS FLOOD kick (bot generate too much output)
- known bugs:
-> bot has sometime problems to reconnect the irc server
-> if you got an error like "can't connect to ...(irc server)... in Net:IRC line ..." use an older version of Net::IRC like
Net::IRC V0.62 (e.g. rename the
serverspyirc/module/Net directory, create a new Net directory and copy the files from the tar.gz into it, or read the README of Net-IRC ;)
- FUNCTIONS:
the bot greps IP's (format: IP (something between) PORT )
in the joined channels and shows short stats of the server
the bot understand commands in form of:
-> !command arguments (type it public in channel but don't do this with your password ;)
-> /msg botname !command arguments
!spyhelp
-> shows a list of current available commands
the following commands are examples for Q2:
- use !q3 or !hl instead of !q2 for the same function in Q3 or HL
- use commands with option + for searches/lists of all known servers of bot (instead of favorite list)
( bot saves all scanned IPs, if it get online response from server)
!q2
-> shows an list of favorite servers (def. in file ServerVXX.pl)
!q2 IP:PORT
-> shows short info of server with ip:port (name,map,number of players)
-> instead of IP:PORT you can ALWAYS USE THE NUMBER OF POSITION IN THE LIST
-> !q2 3 (shows info about the 3. server from the fav. list of Q2)
!q2[+] name
-> shows all servers from fav. list with 'name' in hostname
-> with !q2+ in all known servers
!q2m[+] modname
-> shows list of servers with modname/dir.name from fav. list
-> with '!q2m+ mod' in all known servers
!q2p[+]
-> shows list of servers with players from fav. list
-> with '!q2p+' in all known servers
!q2p[+] playername
-> shows list of servers with playername from fav. list
-> with '!q2p+ playername' in all known servers
!q2s[+]
-> starts backgroundsearch for gametyp until: first hit of server with players, timeout after 60 min. or !stopsearch
-> with '!q2s+' in all known servers
!q2s[+] playername
-> starts backgroundsearch for gametyp until: first hit of server with playername, ...
-> with '!q2s+' in all known servers
!q2s[+] -mod=modname
-> starts backgroundsearch for gametyp until: first hit of server with players and modname, ...
-> with '!q2s+ -mod=mod' in all known servers
!stopsearch
-> stops backgrounds search of !q2s/!q3s/!hls
!q2cw [ IP:PORT | NRinLIST ] teamA teamB sec
-> starts a clanwar info of server
-> prints each 'sec' seconds a output (default sec=30)
-> players splitted in teamA(use e.g. a (substring of) clantag) and teamB
-> scores by frags (rounds not possible)
-> !q2cw output is 1 line with all players
!q2cw+ [ IP:PORT | NRinLIST ] teamA teamB sec
-> 3 lines output, 1 line score and server, 1 line each team with all players
!q2cw- [ IP:PORT | NRinLIST ] teamA teamB sec
-> 1 line output with best player only
!cwstop
-> stops the cw-output in the current channel
other commands:
!find[+] player
-> searchs 'player' in the servers of all fav. lists(!q2, !q3 and !hl togehter)
-> with '!find+ player' in all known servers of all gametyps
!q2teaser [ IP:PORT | NRinLIST ] min
-> starts a teaser output (like !q2/3stat) returning each 'min' minutes
!teaserstop
-> stops the teaser-output in the current channel
!spystats
-> stats of bot
!top [ q2 | q3 | hl ] [ no. ]
-> shows stats of first numbers[no.] of scanned servers IPs (from detection of IPs in channels)
-> with '!top q2 5' you get the first 5 most often scanned Q2 servers
!topurl
-> shows URL (if webserver available) of HTML-site with all scanned IPs
!deltop [ PART_OF_IP | /REG.EXPRESSION/ ]
-> prepares deleting of scanned IPs
!checktop AMOUNT_DECREASE
-> prepares decreasing of hits of scanned IPs
-> prepares deleting of scanned IPs if hits <= 0
!dodeltop
-> executing of !deltop and !checktop
usermanagment: !auth, !adduser, !deluser, !listuser
/msg BOTNAME !auth yourNick yourPass
-> authentificate user to the bot
-> after this type !spyhelp to get a full list of available commands
!adduser username pass flag
-> add a user with username and password, flags are 2=operator, 3=master, 4=owner(you)
!deluser username
-> removes a user with lower flag
!listuser
-> shows all current user of bot
!passwd pass newpass newpass
-> changes your pass in newpass
!reload
-> reload the cfg-, user-, job-, clan- and newsfile
-> useable by bot owner only
clanmanagment: !addclan, !delclan, !editclan, !addmember, !delmember, !listclan, !reload
!addclan -name=clanname -chan=#chan1,#chan2 -admin=nick1,nick2 -mem=nick1,nick2,nick3
-> add a clan with 'clanname' and members nick1,nick2,nick3
-> admins(more rights) are nick1,nick2
-> clan uses #chan1 and #chan2 in irc
!delclan clanname
-> removes a user with lower flag
!editclan -name=clanname [-chan=#chan1,#chan2|-admin=nick1,nick2|-mem=nick1,nick2]
-> edits values of clan 'clanname'
-> editable values are: -chan, -admin, -mem (see !addclan)
!addmember nick
-> adds 'nick' to your clan (if you are admin of clan)
-> nick means username, not irc-nick
-> you can only add known users -> use !adduser before
!delmember nick
-> removes 'nick' from your clan (if you are admin of clan)
-> nick means username, not irc-nick
!listclan
-> shows all clans known by bot
!reload
-> reload the cfg-, user-, job-, clan- and newsfile
-> useable by bot owner only
jobmanagment: !addjob, !deljob, !listjobs, !reload
!addjob #channel,pass STARTIME !COMMAND ARGUMENTS ENDTIME
-> this will order the bot to execute a command (like !q2cw) on a defined time
-> arguments for !addjob
| --> #channel,pass | - the irc channel for the cmd, if this channel is passwordprotected use #channel,passOfChannel |
| --> STARTIME | - use format DD.MM.hh.mm e.g. 13.06.22.30 (13th june, 22.30 ) |
| --> !COMMAND | - the command for execution ... possible (at this time is) !q2cw[+|-] and !cwstop |
| --> ARGUMENTS | - arguments for the command (see above) |
| --> ENDTIME | - some !COMMANDS (like !q2cw) can be stopped at this time, this is optional,
commands like !cwstop don't need a ENDTIME, format is DD.MM.hh.mm |
-> if all is ok you will get back the jobID of the job!
!deljob jobID
-> delete job with jobID
!listjobs
-> shows all jobs an their jobID's
!reload
-> reload the cfg-, user-, job-, clan- and newsfile
-> useable by bot owner only
irc functions: !join, !part, !say, !mode, !opme
!join #channel,pass
-> let the bot join #channel (with pass if needed)
!part #channel
-> let part the bot #channel
!say [ #channel | :nick ] text
-> let the bot say 'text' in #channel or send an private message to nick (don't forget ':' before nick)
!mode #chan [+|-]flags [ nick | #channel ]
-> lets try to change the mode of nick or #channel in #chan, eg. !mode #quake2 +o geeage
-> this only works in channel(s) of your clan!
!opme
-> op for you in the current channel
-> this only works in channel(s) of your clan!
special functions: !rehash
!rehash
-> reload the cfg-, user-, job-, clan- and newsfile
-> clears actual userlogins (they must redo !auth)
-> rejoins all channels
-> restarts all teasers
-> useable by bot owner only
|