|
|
пре 6 година | |
|---|---|---|
| .. | ||
| sql | пре 6 година | |
| www | пре 15 година | |
| QuoteEngine-settings.sample.tcl | пре 6 година | |
| QuoteEngine.tcl | пре 13 година | |
| README.md | пре 6 година | |
Hello!
Steps you need to do (or packages you should have) before downloading the script:
In case you have a running bot, you can continue.
// In case you have an admin user for your mysql server other than the "root" user, you can skip this. //
With root user enter the following command in your shell: # mysql -u root
This will let you to login to mysql, so you can make changes on/in it.
Create a new admin user (so you can login to phpmyadmin later on): mysql> CREATE USER ''@'%' IDENTIFIED BY '';
This will create the <user> with the given password.
Grant all right to the user: mysql> GRANT ALL PRIVILEGES ON . TO ''@'%' WITH GRANT OPTION;
This command allows you to login from any host/ip and gives you unlimited control over all databases.
Check if you did everything well, so the user exists: mysql> SHOW GRANTS FOR ''@'%';
mysql> exit
This will exit you out from the mysql console.
You have two options now: a, Use phpmyadmin, where you can log in with the user which you created in point one and there
create a new database and a new user, then grant that user rights over the database ..
OR
b, Use the following commands:
With your shell user, login to mysql with the previously created user: $ mysql -u -p
Here you will need to enter the password which you have given previous (<pwhere>).
mysql> CREATE DATABASE quotesdb;
This will create a database, named "quotesdb".
Now we need to create an other user for the bot. mysql> CREATE USER ''@'localhost' IDENTIFIED BY '';
This will create a user named "botnick". We will use this user,
to connect to mysql and make changes in database named "quotesdb".
For that, we need to set rights.
mysql> GRANT ALL PRIVILEGES ON quotesdb.* TO ''@'localhost';
This will grant all right on db "quotesdb" to "botnick" user, connecting from localhost.
Now we are ready to move on to the next step. :)
At this point you are ready with the preparations and you can move to the next chapter. :)
!addquote -- add a quote !getquote <#number> -- get the quote of # !randquote -- get a random quote !delquote <#number> -- delete a quote !quotehelp -- list of all available command
Note: some of the commands are limited bot owners, masters, etc.. Check QuoteEngine.tcl for further details. (
You need to check the "bind pub" lines. :)
m,f,o,v are flags (rights) which you can have in the bot
)
!! The php part - so the webiste - won't work, because the code is for php5, so on php7 it wont work. !! I don't recommend anyone to install php5 anymore. !! In case you are into coding and have free time, feel free to contribute to this project, !! rewrite the code and open a pull request! !! Help is much appreciated! :) !! Thanks in advance!
For php5 the instructions are: