| View previous topic :: View next topic |
| Author |
Message |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Fri Oct 19, 2007 3:26 pm Post subject: [SOLVED]Join msg |
|
|
hey
i have a problem
Can enyone tell my why it's nor working...
| Code: | ##################################################
# Set user defined flag for users #
##################################################
setudef flag UserSearch
setudef flag AdminSearch
package require mysqltcl
bind join - * join:aliasfm
bind rejn - * join:aliasfm
######################
### URL to the site ###
#######################
set site_add "http://aliasfm.net"
##################
### Mysql path ###
##################
# SQL info
set sql(host) "xxxxxxxx"
set sql(user) "xxxxx"
set sql(pass) "xxxx"
set sql(db) "abot"
set sql(port) "3306"
######################
### URL to the site ###
#######################
set site_add "http://aliasfm.net "
##################
### Mysql path ###
##################
if {![info exists db_handle] } {
set db_handle [mysqlconnect -host $sql(host) -user $sql(user) -password $sql(pass) -db $sql(db) -port $sql(port)]
}
##################################
### Define The Channels On IRC ###
##################################
set chan_(mainchan) "#aliasfm"
#############################
### Some Global Variables ###
#############################
### Set to 1 if you want the join msg enabled
set globals_(join) "1"
##########################
### Find The UserClass ###
##########################
proc bt.class { class id } {
switch $class {
#"0" {set class "0User" }
"5" {set class "4Live DJ" }
"10" {set class "4Chat Chef" }
"default" {set class "Not Found" }
}
return $class
}
###########################################
### Greeting MSG When User Join channel ###
###########################################
proc bt.join.class { chan nick class} {
switch $class {
### The number is the number of the class on the site
### "return 0" means no msg for that class
#"0" {putserv "PRIVMSG $chan :10Velkommen Til 7:::9 $nick 7:::9 10Vores Outlaw" }
"5" {putserv "PRIVMSG $chan :10Velkommen Til 7:::9 $nick 7:::9 10Vores Live Dj" }
"default" {set class "Not Found" }
}
}
#################
### Join Proc ###
#################
proc join:aliasfm {nick host hand chan} {
global botnick db_handle globals_ error_ help_ chan_
if {$nick != $botnick} {
set chan [string tolower $chan]
if {[channel get $chan UserSearch]} {
if {[mysqlping $db_handle] != 1} {
putserv "PRIVMSG $chan : $error_(mysqllost)"
return 0
}
set sqlnick "SELECT userid FROM nicks WHERE nick='[mysqlescape $nick]'"
set resultnick [mysqlquery $db_handle $sqlnick]
set nicki 0
while {[set record [mysqlnext $resultnick]] != ""} {
set userid [lindex $record 0]
incr nicki
}
if { $nicki == 0 } { return 0 }
if { $userid == "" } { return 0 }
set sql "SELECT username, class FROM users WHERE id='[mysqlescape $userid]'"
set result [mysqlquery $db_handle $sql]
set i 0
while {[set record [mysqlnext $result]] != ""} {
set username [lindex $record 0];
set class [lindex $record 1];
}
if { $globals_(help) == 1 } {putserv "notice $nick : $help_(join)"}
if { $globals_(join) != 1 } { return 0 }
set sql "SELECT username, class FROM users WHERE id='[mysqlescape $userid]'"
set result [mysqlquery $db_handle $sql]
set i 0
while {[set record [mysqlnext $result]] != ""} {
set username [lindex $record 0];
set class [lindex $record 1];
}
mysqlendquery $result
bt.join.class $chan $nick $class
}
}
} |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze
Last edited by Fire-Fox on Mon Jun 24, 2013 7:20 am; edited 2 times in total |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Oct 19, 2007 8:22 pm Post subject: |
|
|
You do have mysqltcl setup?
Also, have you contacted the author? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sat Oct 20, 2007 9:56 am Post subject: |
|
|
| Alchera wrote: | You do have mysqltcl setup?
Also, have you contacted the author? |
How can i check the mysqltcl is working....
And the author, is one i know that has setup another bot with the same funktion, but he is to busy to help at the moment  _________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Oct 20, 2007 6:29 pm Post subject: |
|
|
Because the script is not working I'd assume that you do not have mysqltcl installed.
The script looks for that package.
| Code: | | package require mysqltcl |
| Fire-Fox wrote: | | How can i check the mysqltcl is working.... |
Your answer is might be here: http://forum.egghelp.org/viewtopic.php?p=76869&highlight=#76869 _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sun Oct 21, 2007 7:18 am Post subject: |
|
|
| Alchera wrote: | Because the script is not working I'd assume that you do not have mysqltcl installed.
The script looks for that package.
| Code: | | package require mysqltcl |
| Fire-Fox wrote: | | How can i check the mysqltcl is working.... |
Your answer is might be here: http://forum.egghelp.org/viewtopic.php?p=76869&highlight=#76869 |
thanks so fare
Okay i'll gtry to look into it... with some root access on the server....
Can i use this one... ?
http://barkerjr.net/irc/eggdrop/modules/
| Quote: | MySQL
This module is really a tool for script developers who want to access a MySQL database without an extra Tcl module. This module may be required by certain scripts. A is also available. For an example script, see MySeen in the scripts section of this site. |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
|