[Bug] shoutcast
#10
@ZarTek en effet !

tcl
namespace eval sourcing {
	variable last
	if ![info exists last] {set last ""}
 
	bind pub n|n .source [namespace current]::LoadTcl
	bind dcc n|n source [namespace current]::LoadTcl_DCC
 
	proc LoadTcl {nick host hand chan arg} {
		set err [catch_source [lindex $arg 0]]
		if {$err==0} {
			putquick "PRIVMSG $chan :Pas d'erreur"
			return
		}
		foreach line [split $::errorInfo \n] {
			if {$line!=""} {putquick "PRIVMSG $chan :\00314$line\003"}
		}
	}
 
	proc LoadTcl_DCC {hand idx arg} {
		set err [catch_source [lindex $arg 0]]
		if {$err==0} {
			putdcc "Pas d'erreur"
			return
		}
		foreach line [split $::errorInfo \n] {
			if {$line!=""} {putdcc "\00314$line\003"}
		}
 
	}
 
	proc catch_source arg {
		variable last
		if {$arg=="" && $last!=""} {
			set arg $last
		} elseif {$arg=="" && $last==""} {
			return "Please specify a file"
		}
		if [catch {uplevel #0 source scripts/$arg} err] {
			return 1
		}
		return 0
	}
}



Voilà ce que je voulais mettre, un .source sur un canal ou en PL pour voir si ya erreur dans un tcl
Vous interdisez les erreurs, vous empêchez ainsi la victoire.

Ma super kikoo-page loll
  Reply


Messages In This Thread
shoutcast - by Amigo - 13/09/2021, 22:03
RE: shoutcast - by CrazyCat - 14/09/2021, 00:45
RE: shoutcast - by Amigo - 14/09/2021, 17:43
RE: shoutcast - by pchevee - 14/09/2021, 20:42
RE: shoutcast - by Amigo - 14/09/2021, 21:08
RE: shoutcast - by CrazyCat - 14/09/2021, 23:52
RE: shoutcast - by aliasangelius - 15/09/2021, 13:14
RE: shoutcast - by ZarTek - 15/09/2021, 13:53
RE: shoutcast - by Amigo - 15/09/2021, 18:38
RE: shoutcast - by aliasangelius - 16/09/2021, 01:00
RE: shoutcast - by CrazyCat - 16/09/2021, 08:33
RE: shoutcast - by Amigo - 26/09/2021, 21:32
RE: shoutcast - by CrazyCat - 27/09/2021, 00:11
RE: shoutcast - by Amigo - 27/09/2021, 18:40
RE: shoutcast - by CrazyCat - 28/09/2021, 01:07
RE: shoutcast - by Amigo - 28/09/2021, 21:56
RE: shoutcast - by CrazyCat - 28/09/2021, 23:36

Forum Jump:


Users browsing this thread: 1 Guest(s)