CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
I need help making a barkeeper bot for an IRC

 



toast
Novice

Oct 20, 2008, 5:12 AM

Post #1 of 16 (2428 views)
I need help making a barkeeper bot for an IRC Can't Post

ok so i have a very simple Barkeep bot right now but currently i am using an if statement for each possibility. so its like this

if ($what =~ /^!rum/ ) {
$irc->yield ( ctcp => $channel => "ACTION fills a mug full rum and passes it to $nick" );}

i am trying to figure out how to not be limited to only what i code in but i'm not sure how to go about it.

I would also like to know how to have some one order a drink for some one else. example someone types (!rum bill) and the bot outputs something like Barkeep fills a mug with rum and hands it to bill

because right now I'm limited to an out put like Barkeep fills a mug with rum and and passes it to (the person that typed in the command)

In Reply To


(This post was edited by toast on Oct 20, 2008, 12:08 PM)


KevinR
Veteran


Oct 20, 2008, 2:14 PM

Post #2 of 16 (2419 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post


Quote
i am trying to figure out how to not be limited to only what i code in but i'm not sure how to go about it.


You can't get around that restriction. You will always be limited to what you tell your program to do. There are more efficient ways to define commands based on input though. Using a hash is probably a good way for your application. How to apply it to your particular program is the trick.
-------------------------------------------------


toast
Novice

Oct 21, 2008, 12:14 PM

Post #3 of 16 (2399 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Kevin i know im always limited to what i code in but the point of my question is how to make something tha if a user types in something like !Appletini then it will out put Bot server $nick an appletini also i need to figure out a way to make it so if some one inputs !rum Billy it output Bot gives Billy a mug of rum really your previos post was of NO help at all it doesn't clear up any thing i asked AT ALL now please i really need some serios help


KevinR
Veteran


Oct 21, 2008, 1:49 PM

Post #4 of 16 (2396 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post


In Reply To
Kevin i know im always limited to what i code in but the point of my question is how to make something tha if a user types in something like !Appletini then it will out put Bot server $nick an appletini also i need to figure out a way to make it so if some one inputs !rum Billy it output Bot gives Billy a mug of rum really your previos post was of NO help at all it doesn't clear up any thing i asked AT ALL now please i really need some serios help


Hopefully someone else that is inclined to help a total stranger with free, no strings attached help, will be able to meet your expectations. But after they read your reply to me, I think you've pretty much ruined your chances of that happening. I suggest you try another forum.
-------------------------------------------------


toast
Novice

Oct 21, 2008, 10:33 PM

Post #5 of 16 (2389 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Well I'm sorry if i came across as rude but i am being honest you weren't any help.

Like said I'm sorry if you can't handle the truth just deal with it if I come across as an asshole its because you were an asshole in not answering the question THIS IS A FORUM WERE PEOPLE COME FOR HELP not to be patronized. I'm sorry but your reply to me sounds like you said oh I'm sorry your a dumb ass go fuck yourself which is plain bullshit and not very nice and yes I'm pissed because i have a legitimate question that you decided to dance around.

I'M ONLY AN ASS TO THOSE WHO DESERVE IT i would have much nicer in my reply (and as it goes i could have been much more of an ass as you might have noticed by now) but you treated me like i didn't know anything like I'm an idiot and that really PISSES ME OFF so thats why I'm being an ass and you only mentioned one thing that would help but not how it might help

But I know you can input something like !(fill in the blank) and the bot will out put Bot serves $nick (fill in the blank) or you could input something like !rum bill and the bot would output something like serves rum to bill which i know is possible but i don't know how to do it I know there is a way so that I don't have to code a new if statement every time i want the bot to serve something new I just don't know how yet which was my original question. and i know of several people who are from other forums which are better and much nicer in there replies than could ever dream of being (unfortunately they are not perl forums and the people don't know anything about perl) yes I'm new here and yes you've been here for a while but your not going earn any respect from me unless you stop being an ass and start giving strait answer I don't appreciate you being AN ASS and expecting not to get an angry remark back you COMPLETELY AVOIDED MY QUESTION and expected me to thank you good luck pal not going to happen

now if you had posted something saying if you use a hash, regex, array, or any thing else (i know you mentioned hashes but you didn't explain how it might be helpful or anything that would actually help me) that was actually helpful i would have been very nice and thanked you but no you basically told me to fuck myself

and if any mods (if there are any on this site) see this i don't care if you ban me but because i have a right to say how i feel and if you don't appreciate that to bad i respect people who earn my respect and no one else

now that being said i would still appreciate any useful help that is given but please don't tell me to be nicer in my posts I am really a nice guy but i hate people who avoid valid question and then bitch about being bitched out about it so come on guys this is suppose to be a place to get and offer help not to be douche bags

(I apologize for ranting and cursing but honestly Kevin you where no help and expected me to treat you like you where a god or something seriously Kevin STOP avoiding questions just cause you think something is simple doesn't mean you have the right to act like every one else is a dumb ass)

(This post was edited by toast on Oct 21, 2008, 10:43 PM)


KevinR
Veteran


Oct 21, 2008, 10:59 PM

Post #6 of 16 (2383 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Thank me or call me an asshole, I don't care. But you sir (or whatever you are) have your shorts on way too tight. Good luck with the bot and your mental health issues.

bye-bye Cool
-------------------------------------------------


KevinR
Veteran


Oct 21, 2008, 11:14 PM

Post #7 of 16 (2381 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post


In Reply To
Well I'm sorry if i came across as rude but i am being honest you weren't any help.

Like said I'm sorry if you can't handle the truth just deal with it if I come across as an asshole its because you were an asshole in not answering the question THIS IS A FORUM WERE PEOPLE COME FOR HELP not to be patronized. I'm sorry but your reply to me sounds like you said oh I'm sorry your a dumb ass go fuck yourself which is plain bullshit and not very nice and yes I'm pissed because i have a legitimate question that you decided to dance around.

I'M ONLY AN ASS TO THOSE WHO DESERVE IT i would have much nicer in my reply (and as it goes i could have been much more of an ass as you might have noticed by now) but you treated me like i didn't know anything like I'm an idiot and that really PISSES ME OFF so thats why I'm being an ass and you only mentioned one thing that would help but not how it might help

But I know you can input something like !(fill in the blank) and the bot will out put Bot serves $nick (fill in the blank) or you could input something like !rum bill and the bot would output something like serves rum to bill which i know is possible but i don't know how to do it I know there is a way so that I don't have to code a new if statement every time i want the bot to serve something new I just don't know how yet which was my original question. and i know of several people who are from other forums which are better and much nicer in there replies than could ever dream of being (unfortunately they are not perl forums and the people don't know anything about perl) yes I'm new here and yes you've been here for a while but your not going earn any respect from me unless you stop being an ass and start giving strait answer I don't appreciate you being AN ASS and expecting not to get an angry remark back you COMPLETELY AVOIDED MY QUESTION and expected me to thank you good luck pal not going to happen

now if you had posted something saying if you use a hash, regex, array, or any thing else (i know you mentioned hashes but you didn't explain how it might be helpful or anything that would actually help me) that was actually helpful i would have been very nice and thanked you but no you basically told me to fuck myself

and if any mods (if there are any on this site) see this i don't care if you ban me but because i have a right to say how i feel and if you don't appreciate that to bad i respect people who earn my respect and no one else

now that being said i would still appreciate any useful help that is given but please don't tell me to be nicer in my posts I am really a nice guy but i hate people who avoid valid question and then bitch about being bitched out about it so come on guys this is suppose to be a place to get and offer help not to be douche bags

(I apologize for ranting and cursing but honestly Kevin you where no help and expected me to treat you like you where a god or something seriously Kevin STOP avoiding questions just cause you think something is simple doesn't mean you have the right to act like every one else is a dumb ass)


By the way, thanks for the biggest laugh I've had in quite a while. Your rant is now printed out and pinned to my "wall of shame" for my future reading pleasure.

I almost* feel like helping you now just to repay you for making my day and the many days of pleasure reading your juvenile diatribe will bless me with in the future. Priceless.


* almost, but not quite..... Wink
-------------------------------------------------


toast
Novice

Oct 22, 2008, 4:40 AM

Post #8 of 16 (2376 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Ok Kevin first of all i don't want your help last you tried to help me you were no help at all

secondly you should consider becoming a politician because i feel you would do a great job at screwing people over

thirdly my entire family was tested for mental disorders other mental health issue you could think of and i was the only one that did not have a mental health issue now you on the other hand might

fourthly I think the reason you give such vague answers is because you have no fucking clue what your talking about if I'm wrong i have seen no evidence to the contrary but if you really do know anything I'll be gladly proven wrong but i mean really right now there is no evidence to the contrary

lastly if you want to help people actually help them or don't reply to the posts


KevinR
Veteran


Oct 22, 2008, 10:37 AM

Post #9 of 16 (2364 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

You kiss your momma with that mouth? Tongue


Just don't commit suicide over this mate, that would ruin some of the fun. Crazy
-------------------------------------------------


toast
Novice

Oct 22, 2008, 10:42 AM

Post #10 of 16 (2362 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

um I'm sorry but unlike you I'm not into incest but any way this is the last reply I'm going to post in this thread because really this is stupid and getting out of hand now unless you or some one else has some valuable help I think this thread should be closed, deleted and forgotten about but oh well *sighs* that's just me


(This post was edited by toast on Oct 22, 2008, 10:45 AM)


KevinR
Veteran


Oct 22, 2008, 11:04 AM

Post #11 of 16 (2357 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

ahh.... stop now and spoil the fun? Its not everyday we get a gen-u-ine nucklehead like you around here to brighten the day. I'll just have to learn to adjust to your absense and make the best of it. Tongue
-------------------------------------------------


raglefragle
New User

Oct 23, 2008, 4:49 PM

Post #12 of 16 (2337 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post


In Reply To
ahh.... stop now and spoil the fun? Its not everyday we get a gen-u-ine nucklehead like you around here to brighten the day. I'll just have to learn to adjust to your absense and make the best of it. Tongue


nucklehead, huh?.... it is spelled knucklehead... and absense is spelled absence... gratz! your a jerk and an idiot Wink
bye bye idiot


KevinR
Veteran


Oct 23, 2008, 4:55 PM

Post #13 of 16 (2332 views)
Re: [raglefragle] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

hehehe.... you caught me mate, I am so en-bare-assed Blush

Catch ya later toast

PS: "your a jerk" should be "you're a jerk" Cool

PPS: I'm honored you signed up just to diss me, or try to diss me. "A" for effort, "C" for execution.
-------------------------------------------------


(This post was edited by KevinR on Oct 23, 2008, 4:59 PM)


raglefragle
New User

Oct 23, 2008, 5:22 PM

Post #14 of 16 (2323 views)
Re: [KevinR] I need help making a barkeeper bot for an IRC [In reply to] Can't Post


In Reply To
hehehe.... you caught me mate, I am so en-bare-assed Blush

Catch ya later toast

PS: "your a jerk" should be "you're a jerk" Cool

PPS: I'm honored you signed up just to diss me, or try to diss me. "A" for effort, "C" for execution.


... i'm not toast, first off, second off, i don't need to diss you, you do it well yourself, proving to be an arrogant ass. it is flattering that you give me all passing grades, though. thanks for the grammar correction, i guess you can think once or twice, maybe you should try applying your thought process to doing something useful, but if you want, i am having fun in this exchange of... i guess insults. looking forward to you response to this one Wink


KevinR
Veteran


Oct 23, 2008, 7:07 PM

Post #15 of 16 (2312 views)
Re: [raglefragle] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Sorry mate, toast was entertaining, you're boring.

Best regards
-------------------------------------------------


KevinR
Veteran


Oct 30, 2008, 8:54 PM

Post #16 of 16 (2276 views)
Re: [toast] I need help making a barkeeper bot for an IRC [In reply to] Can't Post

Hi toast, good to see you round these parts again Wink
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives