This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

MySQL kick info script.

Old posts that have not been replied to for several years.
Locked
h
honken
Voice
Posts: 2
Joined: Sun May 29, 2005 9:06 am
Location: Sweden
Contact:

MySQL kick info script.

Post by honken »

Hi.

Well let's start it like this.
I don't know much about tcl scripting (yet anyway).

But if there is someone who likes to help me out with a cool script i would be realy glad.

SCRIPT IDEA:

A kick script thats only operarational by ops (@).
And that logs the kick info in a mysql databas.

like this.
-- start example --

Code: Select all

<@oper> !kick nick You be gone!
** Bot has kicked nick from #channel (You be gone!)
** nick joins #channel
<nick> !who
<Bot> [nick] you got kicked by [oper] at [timestamp] reason: [You be gone!] kick id: [ID]
<nick> !kick oper Stop it
** Bot has kicked nick from #channel (Stop it)
** nick joins #channel
<nick> !who
<Bot> [nick] you got kicked by [nick] at [timestamp] reason: [Stop it] kick id: [ID]
<nick> !stat nick
<Bot> [nick] has been kicked [2] times
-- end example --

Can be a lot of work to do this script.
Most important thing in this is the non-@ block and that the info is entered in to a sql db.

I think i have an good idea on who to do this is just that i need some help on the functions for the public commands and how to bind them to work list and how to get the @-er to be active.
Since command: !stat <nick> will be accessable by all and !who but not !kick.

Code: Select all

set sql(host) "localhost"
set sql(username) "username"
set sql(password) "password"
set sql(database) "kickeddb"
set sql(socket) "/var/run/mysqld/mysqld.sock"

set sql_connect [mysqlconnect -host $sql(host) -user $sql(username) -password $sql(password) -db $sql(database) -socket $sql(socket)]

bind pub - !kick kick:nick
bind pub - !who UNSURE since its just one command
bind pub - !stats stats:nick
proc kick:nick { blha blha }
proc who:pub { blha lbha }
proc stats:nick { blaha blha }
Thats what i think it will look like for now anyway?
Any help at all will be nice.[/code]
Configure a new world. Since the default one sucks.
Locked