egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL kick info script.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
honken
Voice


Joined: 29 May 2005
Posts: 2
Location: Sweden

PostPosted: Sun May 29, 2005 11:04 am    Post subject: MySQL kick info script. Reply with quote

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:

<@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:

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber