JAChapmanII/jbotc
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
jbotc is a simple IRC bot written in C.
Building:
If it's your first time,
cp defines.h{.def,}
and then change things such as username and server/room to connect to.
Then issue:
make
This builds conbot and jbot binaries.
Running:
You can simply run
./bin/conbot
to have your bot loaded and connected to your defined IRC channel. conbot
is a wrapper around jbot which connects to IRC and handles pinging. jbot is
what actually handles all the functionality.
If you want to test out jbot's functionality:
./bin/jbot
It will first print a PRIVMSG to its OWNER as a greeting. It then accepts
standard IRC broadcast messages and responds to them. For instance if you
type:
:nick!user@hostmask PRIVMSG #CHANNEL_NAME :NICK: o/
it should respond with
PRIVMSG #CHANNEL_NAME :nick: \o
or
PRIVMSG #CHANNEL_NAME :nick: o/
which would appear as a wave back in an IRC client.
Debugging:
I've recently done a lot of work with valgrind, trying to figure out its
mysterious ways. I believe I've failed. In any case, you can use
valgrind ./bin/jbot
to see if there is anything funky going on according to it.
I made a suppressions file for regex functions and some internal sscanf
things, but I believe that was all stemming from setting a pointer the
result of malloc not initializing the pointer according to valgrind. So, my
suggestion is don't use it.