12/08/2009, 04:08
(Modification du message : 12/08/2009, 04:14 par BlackNight.)
Voivi un petit SOS pour toi recodé vite fait.
Je vais VOLONTAIREMENT y placer des erreurs, pour que tu voye un peu comment ca fonctionne. Ce sont des erreurs toutes bêtes, mais qui t'obligeront a relire le tcl correctement.
Je vais VOLONTAIREMENT y placer des erreurs, pour que tu voye un peu comment ca fonctionne. Ce sont des erreurs toutes bêtes, mais qui t'obligeront a relire le tcl correctement.
tcl
set ::alertchan {
""chan1"
"#chan2"
"#chan3""
}
bind pub - !sos sos_alert
proc sos_alerte {nick uhost handle chan args} {
putquick "NOTICE $nick :\002\00312Votre SOS a été envoyé au staff \003\002"
set ::chango $chan
foreach chanalert $::alerteuhchan {
putquick "LocOps :\002\00304SOS\002:\00312 $nick \00306>> \00304!SOS par $nick \00301sur\00312 $chan !!\003"
putquick "PRIVMSG $chanalert :\002\00304SOS\002:\00312 $nick \00306>> \00304!SOS par $nick \00301sur\00312 $chan !!\003"
putquick "NOTICE $chanalert :\002\00304SOS\002:\00312 $nick \00306>> \00304!SOS par $nick \00301sur\00312 $chan !!\003"
}
}
bind pub - !gosos sos_join
proc sos_joint {nick host hand chan arg} {
foreach gochan $::alertchan {
if [string match -nocase $gochan $chan] {
putquick "SAJOIN $nick $::chango"
putquick "SAMODE $::chango +h $nick"
putquick "PRIVMSG $chan :\002\00312$nick \00306prends en charge le \00304SOS \00306sur\00305 $::chango\003\002"
}
}
}