Closed Bug 800539 Opened 12 years ago Closed 6 years ago

Firebot doesn't respond to text "you"

Categories

(Webtools Graveyard :: Mozbot, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: mr_pathak, Assigned: adarshdinesh)

Details

(Whiteboard: [type=good first bug])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4 Steps to reproduce: I queried firebot with text "you" Actual results: No reply from firebot Expected results: Description of firebot is what I was expecting
Severity: normal → minor
Whiteboard: [type=good first bug]
Firebot reply's when asked |who or when| but doesn't respond on |what or why| :D
I would like to start working on this bug .But don't know where the firebot code is kept ,I think this is the code https://mxr.mozilla.org/webtools/source/mozbot/mozbot.pl As there is nobody working in firebot i face difficulties is getting help. Can i pick this bug?
(In reply to adu from comment #2) > I would like to start working on this bug .But don't know where the firebot > code is kept ,I think this is the code > https://mxr.mozilla.org/webtools/source/mozbot/mozbot.pl > As there is nobody working in firebot i face difficulties is getting help. > Can i pick this bug? That is the right code to fix. Firebot is the Mozilla bot that runs on mozbot's codebase for Mozilla IRC. The project is active--there is just very little that is added or modified about the code these days. Any changes made to mozbot should be applied to firebot as well. The only reason that firebot has a separate code base is that there were some special modifications made to mozbot.pl by Wolf to allow it to run in Cygwin. As you are wanting to work on this, I am assigning you to this bug. I can help walk through parts of fixing this, but there are others like Wolf who are better qualified to help particularly on questions about firebot. (I haven't added a patch to mozbot ion about three years or more.)
Assignee: nobody → adarshdinesh
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
fire bot is designed to reply back the informations about the nick name which we have given to it . adu > firebot:tmyoung firebot > adu : I seem to recall that tmyoung is Tanner M. Young <mozilla@alyoung.com>, bugmail <mozilla-bugs@alyoung.com> we need the description of firebot back when we send "you" to it right? what will happen if there is someone in the channel with "you" as a nick name , do we expect the description of firebot or the information about the user with nick name "you" ?
adu sorry I couldnt help more on irc but tmyoung has a comment in your bugzilla saying he'll help you ... if you really want to work on that, post your questions in here and wait for him to reply ... I don't know that code
(In reply to adu from comment #4) > fire bot is designed to reply back the informations about the nick name > which we have given to it . > adu > firebot:tmyoung > firebot > adu : I seem to recall that tmyoung is Tanner M. Young > <mozilla@alyoung.com>, bugmail <mozilla-bugs@alyoung.com> > > we need the description of firebot back when we send "you" to it right? > > what will happen if there is someone in the channel with "you" as a nick > name , do we expect the description of firebot or the information about the > user with nick name "you" ? Unless "you" is a word reserved by another module, this can be fixed in two ways. First is to teach firebot what "you" means using the info module: that's how my information works, because firebot only knows about "tmyoung" based on what it's taught. The other way is to hardcode "you" as a reserved word in the mozbot source code and have it dynamically generate a description of it, its uptime, version number, or anything else we would want it to load. This approach would apply to all mozbots there are (once updated), the first option can be done at any time from IRC without changing source code--unless "you" is a reserved word, but I don't think it is. I would advise the first approach--certainly for the moment, unless you want to write a patch for all mozbots and see if Wolf approves of it. I think the likelihood of having a case where somebody is named "you" in an irc channel is highly unlikely except as a joke, since every time someone says "you" anywhere in a conversation, that person will be notified. The only thing worse would be setting one's username to "the" or some emoticon. The documentation to update firebot's info database is here: https://mxr.mozilla.org/webtools/source/mozbot/BotModules/Infobot.txt Try that and see if it fixes it for the moment. If we want "you" to become a reserved word for all mozbots, then we can create a patch that will overwrite whatever is in the info database later, since that will take longer to write and approve. Good luck, and let us know if it works.
I think adding these lines in /webtools/source/mozbot/BotModules/Greeting.bm will fix this bug. @@ +64@@ + ['who', 1, 1, 'I\'m firebot, I provide Bug Updates (and much more) for Firefox and the rest of the Mozilla world. I\'m maintained by Wolf and you can find out more about me here...'], @@ +146@@ + } elsif ($message =~ /^\s*you\s*$/osi) { + $self->say($event, "$event->{'from'}: $self->{'who'}"); Hope i am on the right path!
Yes you're on the right track, however, we need it to be customizable as this code will change all mozbot installs, not just the firebot install. So we need five things: 1) Default text that applies to any mozbot installation like "Hi! I'm [irc nickname]. I'm a mozbot running on [irc hostname]. My source code homepage is [url]. I have been running for [uptime]." or something to that effect. 2) A way to customize the text to say what you're suggesting like "I'm firebot, I provide Bug Updates (and much more) for Firefox and the rest of the Mozilla world..." 3) A way to revert to the default text from any customizations made. 4) Optionally, some permissions integration that prevents just anybody from changing the text. Instead restricting it to administrators if the Admin module is loaded (or something close to that). 5) Optionally, some safe code that allows for variables in the customized text like uptime, nickname, etc. without risking compromise of the running script. Perhaps a simple whitelist of options that are set apart by brackets like above. (This is certainly the least important suggestion.)
That text is not provided by Greeting - since that text refers to me and firebot by his own nick, its in a custom module - Firebot.bm; If that's what this is about (i.e. the response when you say to, then this bug does not apply to mozbot in general, and is firebot specific. The relevant lines from Firebot.bm: } elsif (($message =~ /(who|what) is.*$event->{nick}/i) || ($message =~ /(who|what) are you/i) || ($message =~ /^\s*firebot[?\s]*$/osi)) { $self->say($event, "$event->{'from'}: I'm $event->{nick}, I provide Bug Updates (and much more) for Firefox and the rest of the Mozilla world. :-) I'm maintained by Wolf and you can find out more about me here, http://firebot.psychoticwolf.net/"); The generic text is something like "I am a bot, /msg for more details" This also might be resolved with a simple you = <alias>firebot, in the infobot database, if its the Infobot definition thats being returned. So, instead of overdesigning a solution here, lets make sure we know what we're trying to solve first.
Flags: needinfo?(miteshpathak05)
Wolf From where i can get the firebot custom modules like Firebot.bm to work on?
(In reply to adu from comment #10) > Wolf > > From where i can get the firebot custom modules like Firebot.bm to work on? I think there are two ways to fix this: First is a simple addition to Firebot's info database, which has been mentioned several times in this bug. I would advise this if we are just wanting to fix Firebot not responding to "who" or another word. Like is mentioned in Comment #6 and Comment #9. Second is to patch something into one of the Modules that would give a default info text for a set of reserved words (which we may already have something that does a lot of that), and that can be customized for firebot. Like is mentioned in Comment #8. I favor the former solution as it is the simplest, and we can always do the latter later. Wolf, I think it is up to you as the module owner to decide which one.
I think this bug is general to all the mozbots . Adding the word to the firebot database will not be a good idea ,right..?
Flags: needinfo?(miteshpathak05)
I am really interested in fixing this issue, someone please tell me from where will i get the firebots database (If we want to edit the db) ? or where should i edit (customizing firebot)??

Mozbot/Firebot is in maintenance-only mode; no further changes are planned.

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: