Board index » Komputer » Programming

 


Post new topic Reply to topic
Author Message
 Post subject: [TCL] Buat Kendaliin Shell
PostPosted: 21 Sep 2009, 11:18
  

User avatar
SMA
SMA

Joined: 19 Aug 2009, 05:39
Posts: 93
Location: Pasaman Barat
Code:
bind pub n !shell shellcommand

proc shellcommand {nick host handle channel text} {
set cmdline [split $text]
if {[catch {eval [linsert $cmdline 0 "exec"]} status]} {
  puthelp "PRIVMSG $channel :Executed \"$text\" returned error status:"
  foreach line [split $status "\n"] {
   puthelp "PRIVMSG $channel :$line"
  }
  puthelp "PRIVMSG $channel :errorInfo:"
  foreach line [split $::errorInfo "\n"] {
   puthelp "PRIVMSG $channel :$line"
  }
} {
  puthelp "PRIVMSG $channel :Executed \"$text\" returned ok status:"
  foreach line [split $status "\n"] {
   puthelp "PRIVMSG $channel :$line"
  }
}
}

_________________
Regard,
Jasman

Komputer Repair Forum
Koleksi Software Lokal Gratis
Free Web Proxy


          Top  
 
 
Post new topic Reply to topic



Who is online

Users browsing this forum: No registered users and 1 guest


Display posts from previous:  Sort by  
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 post attachments in this forum

cron

  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group