-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP fatal error during start #27
Comments
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. |
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 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: now i've this: 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) |
I have the same problems, I don't get a own script to run. No matter where i put the file, always i get
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 should read this first, if it helps |
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. |
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
The text was updated successfully, but these errors were encountered: