Open tommyken opened 11 years ago
There is a spelling mistake, which both myself and FutileFreedom have fixed.
Either pull mine or his code if you want it fixed: https://github.com/pogosheep/IRC-Bot/pull/26 https://github.com/pogosheep/IRC-Bot/pull/25
Mine also fixes a few other bugs and oddities and adds a little bit of functionality.
thank you, it indeed fixes the problem. Now i see how to find it too.
Now i was wondering, how to create in easy way (php file) to add my own script i wanted to say on my bot. thank you...
nobody ?
I don't quite get what you mean, explain a bit more please.
I want to put my own scripts in the php bot. p.e. google What and where do i have to place the 'google.php' where to put '!google' command ?
Or some explain in what orde to place 'commands' scripts
Thx advanced!!
OK, I understand what you mean now, I did think you meant that but I wanted to check.
OK from the main directory you have the folder Classes, all classes go under here under different folders.
The Command folder stores commands (such as !google), the Listener folder stores listeners (things that monitor different messages such as JOIN and PRIVMSG and need to respond to chat, like a URL title parser for example), and things under Library are to do with the bot itself, the base classes (what each command extends) for Command and Listener are also under here.
Some of my Commands need a Listener AND a Command, so I put them under command and put two classes inside this file under two different namespaces (Command for the command and Listener for the listener).
When you make a command you extend the base class so that it inherits everything to be used. Explore these classes to see what you inherit.
Hope that helps. =)
this is my code i've used before: http://pastebin.com/eS5bqpbA
now i've this: http://pastebin.com/NK19RWqY
so if i got it right. I've to place this in listener (named horoscoop.php) and also in command ?
Sorry if its hard .
Thx for the help!!
You'll need to do some clean-up of the variables so that they correspond to the ones that the bot provides.
If you pulled my code then you'll need to check: https://github.com/ElvenSpellmaker/IRC-Bot/blob/master/Classes/Library/IRC/Command/Base.php
Else if you used Pogo's code then you'll need to check: https://github.com/pogosheep/IRC-Bot/blob/master/Classes/Library/IRC/Command/Base.php
Look at how arguments are named, also the command to send to a channel is different to how you have. If you look at one of those it might help.
i did clean up my file and changed some of arguments and 'send' options, but still don't get this working, It doesn't find/react on my file. I didn't saw it in the 'cmd window'. The others what already has been placed in the folders, those i cansee. But i better gonna quit. Its too difficult for me :( . Too much serperated links, while i thougt two things (1 line to add and a file with code) thx anyway
I have the same problems, I don't get a own script to run. No matter where i put the file, always i get
[ MISSING ] The following, not existing, command was called: "Imdb".
Heres my code of the file in "/Classes/Command" http://pastebin.com/JBTJxi3f
@NeXxGeN have you added it to the config file?
OMG, no!
That was the problem, thank you! facepalm my own
@NeXxGeN great to hear that. Make a PR when you finish the command, looks like a very useful one.
I will do :)
Maybe you can help me, but i cant pull a request. There's no button or something else to pull a request. ![Uploading Bildschirmfoto vom 2013-03-12 14:46:44.png . . .]()
Maybe you should read this first, if it helps https://help.github.com/articles/using-pull-requests
No, it seems I am to dumb. Never mind, here is the source code, do what u want with it: http://pastebin.com/c09qGdP2
I've added PR. https://github.com/pogosheep/IRC-Bot/pull/29
Thank you, i have to learn more about git, I'm really new to this.
Hello, when i tried to php file , i got this error. PHP Fatal error: Call to undefined method Listener\Joins::getKeywors()
Config file is offcourse changed.
Thx