Go Back   FlashFXP Forums > > > >

International Help Get help in your native language (non-english).

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-20-2005, 06:15 PM   #1
fungraphic
Junior Member
ioFTPD Foundation User
 
Join Date: Jun 2004
Posts: 19
Default Script Credits pour iRC

Bonsoir à tous.

Voici une version amélioré de ce sript........
http://www.inicom.net/forum/showthre...hlight=credits

Ce script est un script pour la commande credits dans iRC.
Je m'explique!
Si vous avez des comptes leech ou autre vos utilisateur peuvent savoir combien il leur reste de credits en tapant la commande !credits <user>.

Ce sript ajoute le group au quel le user appartient, et il permet également de personnaliser le message suivant le group au quel appartient le user.

Quote:
#credits.tcl 1.15
set passwd "C:/ioFTPD/etc/UserIdTable"
set idgroup "C:/ioFTPD/etc/GroupIdTable"
set userroot "C:/ioFTPD/users"
proc b {} {return \002}
proc c {} {return \003}
proc u {} {return \037}
set splitter(CHAR) "\n"
proc credits {nick uhost handle chan args} {
global passwd userroot idgroup
if {[lindex $args 0] == ""} {putserv "PRIVMSG $chan :usage !credits user";return}
set fileid [open $passwd r]
set data [read $fileid]
close $fileid
foreach line [split $data \n] {
if {[string equal [lindex $args 0] [lindex [split $line :] 0]]} {
set data $line
}
}
foreach dline [split $data \n] {
set cname [lindex [split $dline :] 0]
set dline [lindex [split $dline :] 1]
if {[regexp -- "[lindex $args 0]" $cname]} {set exist 1} else {set exist 0}
if {![string equal {} $dline] } {
if {![file exists $userroot/$dline]} {
return
}
set fileid [open $userroot/$dline r]
set sata [read $fileid]
close $fileid
foreach line [split $sata \n] {
set line [string tolower $line]
}
}
}

foreach line [split $sata \n] {
if {[string equal "groups" [lindex [split $line " "] 0]]} {
set groupuser [lindex [split $line " "] 1]
}

}

set fileid [open $idgroup r]
set data [read $fileid]
close $fileid

foreach line [split $data \n] {
if {[string equal $groupuser [lindex [split $line :] 1]]} {
set datagroups [lindex [split $line :] 0]
}
}

foreach line [split $sata \n] {
if {[string equal "credits" [lindex [split $line " "] 0]]} {
set credsex $line
set credsec0 [lindex $credsex 1]
set credsec1 [lindex $credsex 2]
set credsec2 [lindex $credsex 3]
set credsec3 [lindex $credsex 4]
set credsec4 [lindex $credsex 5]
set credsec5 [lindex $credsex 6]
set credsec6 [lindex $credsex 7]
set credsec7 [lindex $credsex 8]
set credsec8 [lindex $credsex 9]
set credsec9 [lindex $credsex 10]
set allcreds [expr ($credsec0 + $credsec1 + $credsec2 + $credsec3 + $credsec4 + $credsec5 + $credsec6 + $credsec7 + $credsec8 + $credsec9) * 1.0]
}
}


if {"leech"==$datagroups} {putserv "PRIVMSG $chan :\[\002CREDITS\002]\ \002[lindex $args 0]\002 from the [b]leech[b] group has \002[formatkb $allcreds]\002 left this week"} elseif {"ViP"==$datagroups} { putserv "PRIVMSG $chan :\[\002CREDITS\002]\ \002[lindex $args 0]\002 is a [b]ViP[b] member!!"} elseif {"siteop"==$datagroups} { putserv "PRIVMSG $chan :\[[b]WARNING[b]]\ You're asking for siteops informations, next time we could add a SITE TAKE 10000"} elseif {$exist == 0} { putserv "PRIVMSG $chan :\[[b]CREDITS[b]\] User does not exist!" } else {putserv "PRIVMSG $chan :\[\002CREDITS\002]\ \002[lindex $args 0]\002/$datagroups has \002[formatkb $allcreds]\002"}
}
proc formatkb {size} {
if {$size >= 1073741824} {
set amount "[format %.2f [expr $size/1073741824.0]] TB"
} elseif {$size >= 1048576} {
set amount "[format %.2f [expr $size/1048576.0]] GB"
} elseif {$size >= 1024} {
set amount "[format %.2f [expr $size/1024.0]] MB"
} else {
set amount "[format %.2f $size] KB"
}
return $amount
}
bind pub -|- !credits credits
putlog "credit script 1.15 loaded!!!"
Voila en espérant vous avoir apporté un plus!!!

PS:
Pour la prise en charge du blowfish je ne promet rien mais je vais regarder car pour moi le sript ne fonctionne pas!!!
fungraphic is offline   Reply With Quote
Old 09-21-2005, 05:33 AM   #2
scoonydeus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 13
Default

Hello,

i've seen this one somewhere...

And yes blowfish is working ... lol

FRENCH:

Salut,

J'ai deja vu ce fichier quelque part ...

Et pour info blowfish fonctionne les doigts dans le nez avec celui ci
scoonydeus is offline   Reply With Quote
Old 09-21-2005, 05:43 AM   #3
scoonydeus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 13
Default

Comme je l'ai dis plus haut voici la solution pour crypter n'importe quel script
http://www.donationcoder.com/Softwar..._eggdrop.shtml

j'ai poster dans le topic de la commande invite aussi
scoonydeus is offline   Reply With Quote
Reply

Tags
$credsex, credits, set, [lindex, [split

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:18 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)