Mozbot/FAQ

From MozillaWiki
Jump to: navigation, search

What is mozbot?

Mozbot is an IRC bot. Originally designed specifically for the irc.mozilla.org community, it has grown into a multipurpose bot with many features.

What does it do?

Quite a bit! Mozbot provides helpful services to the developer communities using other Mozilla webtools, such as displaying information on bug reports from Bugzilla, displaying changes in the [../tinderbox/ Tinderbox] status, and reporting the sheriff of the tree. Mozbot also provides several important services to keep IRC working well, such as giving ops to trusted users and keeping channels open and the right people in control. There are also Infobot and Quizbot modules. For more information, see the modules documentation.

Modules?

Mozbot is important because it allows developers to write bot modules in perl using the mozbot APIs. If you are interested in writing modules, take a look at our Introduction to Hacking Mozbot. Modules can be installed and updated on the fly, without shutting down the bot.

So, I want mozbot to auto-op people in my channel, how can I?

See the God Module documentation.

Where can I get the source/get involved?

Mozbot is written in Perl and is free software under the terms of the MPL. Mozbot is [download.html#cvs available through CVS]. If you want to write modules or fix bugs, take a look at our Introduction to Hacking Mozbot and come chat to us in #mozwebtools. <dt id="localAddr Mozbot doesn't connect to the IRC server on my dual-homed box.== Open up your config file and append localAddr=192.168.0.1 where the IP address is that of the interface to use. You must be using Net::IRC 0.71 or above for this to work. See bug 93186 for more details.

Mozbot doesn't connect to the IRC server on my unnamed box.

Give your host a hostname. ==So far we're not getting many responses from the new bot... what's something simple to try?== First thing to do is to load some modules. To do this you'll need to authenticate as an administrator. You can read all about that in the [http://lxr.mozilla.org/mozilla/source/webtools/mozbot/INSTALL#165 installation instructions]. Once you've done that, say /msg mozbot load Greeting, where Greeting is the name of a module to load. You can see the list of standard modules on the [docs/ documentation page].

Mozbot keeps getting kicked for flooding.

Increase the throttleTime variable in the Admin module. For example, this is how Hixie increased the throttle time of his bot called oopsbot:

<Hixie> <kbd>oopsbot: vars Admin throttleTime</kbd>
<oopsbot> Variable 'throttleTime' in module 'Admin' is set to: '1.3'
<Hixie> <kbd>oopsbot: vars Admin throttleTime '1.6'</kbd>
<oopsbot> Variable 'throttleTime' in module 'Admin' has changed.

There is no correct value for this variable; different servers use different algorithms to determine who is speaking too much. Tweak it until you are happy with the compromise between your bot's response time and its likelyhood of getting kicked during heavy use. (Note: You have to be authenticated as bot admin for this to work. See the [http://lxr.mozilla.org/mozilla/source/webtools/mozbot/INSTALL#165 installation instructions] for details.)

What platforms does mozbot run on?

It's been seen running on most flavours of Linux, BSD and MacOSX. On Windows, there are serious issues with any module that tries to fork(). That includes basically any module that uses FTP or tries to go to a website. Patches welcome! :-)

I just found a bug in mozbot, where do I report it?

[http://bugzilla.mozilla.org/enter_bug.cgi?reporter=ian%40hixie.ch&product=Webtools&version=other&component=Mozbot&rep_platform=PC&op_sys=Linux&priority=--&bug_severity=normal&assigned_to=&cc=&bug_file_loc=&short_desc=&comment=STEPS+TO+REPRODUCE%0D%0A+++1.+%0D%0A+++2.+%0D%0A+++3.%0D%0A%0D%0ASEEN+WITH%0D%0A+++Server%3A+%0D%0A+++Bot%3A+&maketemplate=Remember+values+as+bookmarkable+template&form_name=enter_bug In Bugzilla.] Please include as many details as possible.