WifiFred Git
Brought to you by:
masham
| File | Date | Author | Commit |
|---|---|---|---|
| data | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| etc | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| extras | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| src | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| COPYING | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| CREDITS | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| INSTALL | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| LICENSE | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| README | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| TODO | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| packing.lst | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
| run.sh | 2025-08-03 |
|
[cbf278] Initial Commit to Git |
------------------------------------------------------------------------------
WifiFred - The BC Wireless IRC bot
See COPYING for Copyright information.
$Id: README,v 1.2 2004/12/22 02:10:06 masham Exp $
Thanks for downloading WifiFred! Fred was open sourced in January 2003, this
release (circa December 2004) is the first major release since last year.
This release contains the current "live" code running on irc.bcwireless.net
but may not work due to packaging issues.
THERE MAY BE MISSING FILES. Please let me know if this is the case.
------------------------------------------------------------------------------
WARNING:
The code is RAW. UGLY and BUGGY. A lot of it was written spur of the
moment, often under the influence of beer, lust and wifi.
But it usually works.
CONTRIBUTING:
I'm happy you're messing with the code, but if you make improvements, changes or
add modules PLEASE send them on for inclusion.
I realize you don't have to do this, but it's courtesy, and if you don't, you suck. ;)
You can email changes to matthewa@bcwireless.net
WifiFred's testing channel is #alphafed on irc.bcwireless.net.
NOTES ABOUT PHPIRC:
WifiFred's IRC networking code is phpIRC by Till Gerken, however, the included copy of
phpIRC has been modified. DO NOT TRY TO REPLACE PHPIRC WITH ANOTHER VERSION, IT WILL
BREAK THIS SOFTWARE.
A significant change between the "regular" version of phpIRC and WifiFred's version
is the use of irc_privmsg. WifiFred's phpIRC adds messages into a global array
named _OUTBUFFER. This buffer is enumerated and cleared during the idle callback
in wififred.php::wififred_onidle. The purpose of this change is two fold:
* The buffer can be "cleared" using !stop.
* WifiFred can (theoritically) detect when he's flooding, and purge excessive noise
from the buffer.
The function prototype for irc_privmsg is as follows:
STOCK phpIRC:
function irc_privmsg($destination, $msg)
WifiFred phpIRC:
function irc_privmsg($destination, $msg, $oldmsg="",$sendnow=false)
As you can see, two extra parameters are listed. oldmsg isn't really used, it's for
future use. $sendnow is used to handle buffering. if $sendnow is false, the $msg
to $destination is placed in $_OUTBUFFER. if $sendnow is true, the message will
be delivered to $destination immediately. This functionality is particularly
useful in long running functions, like traceroute.
OVERVIEW:
WifiFred is an IRC bot designed with Wireless in mind. He has a bunch of
RF calculation tools, TCP/IP databases and rudimentry IRC communication
facilities. Multiple copies of WifiFred can be operated against different
IRC networks but with the same database. This enables WifiFred to be multi
network aware in his inter-messaging and share knowledge databases.
WifiFred's home page is http://www.bcwireless.net/WifiFred/
GETTING STARTED
To get started, you'll need:
* PHP compiled as a "cgi" or "cli" and the latest PEAR libraries (mainly
for SOAP). You'll also need CURL, and possibly some other libraries
I've not mentioned.
* MySQL (tested with 3.23.47)
LOADING THE SQL DATABASE
ircbot.sql contains the MySQL structures that need to be loaded. As of the moment
there is no example data to load an authuser. Also, some tables may not exist. One
day I'll get around to moving them all into one database.
CONFIGURATION
ircbot.conf contains a basic configuration. Be sure to read through the entire
file carefully. Everything is not documented here. :)
The config file is basically a Windows style .ini file.
[irc]
wanted_nick = The bot's nickname
wanted_nick_pw = The bot's NickServ password.
wanted_server = The IRC Network being connected to
wanted_serverhost = The actual IRC server to connect to
wanted_port = the IRC server port to connect to
wanted_modes = the modes the bot should set upon connect
wanted_channels = the bot's "home" channel
join_channels = extra channels to join when running in auto/production
my_owner = the irc nick of the bot's owner, the bot will send admin warnings
to this user.
command_char = the character commands are prefixed with (eg: !, ~, etc.)
flood_limit = flooding timeout.
[logs]
log_path = path where the bot should store his internal logs
weblog_path = path to where the bot should store censored, web logs.
weblog_uri = url of location where the web logs are.
[abuse]
abuse_seconds = number of seconds to sample (use 3)
msgcount = number of messages allowed to be received in sampling period (use 3)
ignore_start = number of seconds to ignore the user for, first offense
ignore_increment = number of seconds to add to users ignore for subequent offenses (if the ignore is active)
[commands]
command_processor = The PHP script in command_sets/ to use.
[special_commands]
say_command = Not defined by default. This command makes the bot say something
emote_command = Not defined by default, this command makes the bot emote.
[sql]
dbhost = The MySQL host to connect to
dbuser = The Database user to login as
dbpassword = the database password
dbname = the database to use
die_on_fail = Whether the bot should exit if mysql fails to connect
[nickserv]
nickserv_nick = The nickname of the NickServ service
nickserv_host = The host of the NickServ service
nickserv_identstring = Message to look for from NickServ indicating that identification is needed.
[google]
key = your google API license key
Notes:
* channel keys can be specified by using a :. ie: #channel:thekey
RUNNING THE BOT
basic usage:
php ./lilbot.php3 ircbot.conf
where 'ircbot.conf' can be any config file. This will cause the bot to login
to $wanted_channel, and is useful for testing.
-- Command line switches --
-a - Run in "auto" mode, this tells the bot to join the channels specified by
'join_channels' in the .conf. Without it, the bot will only join 'wanted_channel'
SUPPORT TOOLS
The tools/ directory contains various scripts that will help you load various
database tables. Presently these consist of import scripts to populate the
RFC, BCP, STD and FYI tables. These are not supported, you'll need to RTFS
for now (hint: you need to manually strip the leading blurbage from downloaded
internet standards), you'll also need to add a blank line to the end of each file
otherwise the last data entry will be skipped. patches welcome :)