NandGate
Note: This document is obsolete and is only a draft.
NandGate is an IRC bot, written in Perl. It uses MySQL for it's logging, user-authentication and ACLs.
NandGate has user-based ACLs, so for an example, one user may let NandGate do some things, while another user can't.
NandGate currently supports two kind of authentication:
- Sessions: You just log on, and you stay logged on (if you don't quit/part/join channels NandGate sits on)
- One time password: You authenticate at the same time you perform the command
- PGP authentication: You authenticate by signing a peace of text provided by NandGate, and you stay logged on (works the same way as sessions do). (Not implemented yet)
NandGate can also prove who it is, via PGP signitures.
The commands NandGate supports are:
Non-privileged commands:
- logout (Clears the session data from the DB)
- bsod, a very very old joke I keep here for historical reasons :)
- status, tells you when it was started up (UNIX time)
- version, tells you it's version number
- ask, another old joke
- uptime, same as status
- tellme, gives you your messages
- seen, gives you info about someone
- pgp-sign, signs a text, and gives you the signiture
Privileged commands, ACL based:
- die, hard exit
- quit, NandGate quits
- reconnect, NandGate reconnects to the IRC server
- nick, NandGate changes it's nick
- funmode, funmode is set to on/off, depending on if it's already on or not
- msg, privmsg's a channel or a nick, with a message from you
- join, joins a channel
- part, parts a channel
- rejoin, rejoins all the channels in the channels database
- kick, kicks someone from a channel you specify
- topic, sets a topic on a channel, the topic is specified by you
- mode, sets a mode on a channel
- invite, invites a nick on a channel, both specified by you
- opme, ops you on a channel you specify
- ban/unban, bans/unbans someone on a channel you specifiy
- tell, gives a message to be saved to someone
The format for most of these commands is:
adm username password [command] [normal irc parameters]
You create a session like this:
auth username password
Then you can execute the commands like this:
admin [command] [normal irc parameters]
The exceptions are with the invite command, it works like this in NandGate:
invite [channel] [nick]
The installation of NandGate is simple: You have to fetch and install these perl modules:
- Data::Dumper
- Msql-Mysql-modules
- Net::IRC
- String::Random
- File::MkTemp
- Data::ShowTable
Create the database from the nandgate.sql file.
... I never finished this
You can fetch NandGate here: nandgate-1.3.tar.gz and the PGP signiture here nandgate-1.3.tar.gz.asc.
Feel free to make additions to NandGate, if you want and if you can, I'd appreciate if you would send me the changes. :-)