?rules Script

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

?rules Script

Postby jonlar » Mon Aug 18, 2008 4:42 pm

Hi everybody. I was searching the Web right now but all i found was OLD and did not worked anymore.

I am just looking for a script that, if somebody writes, e.g., ?rules in a specific chan, posts some Lines of text as notice or private Message. I would like to write the Text in a *.txt File (without touching the Script)

Maybe somebody has something like that. Thanks

Re: ?rules Script

Postby Cristian » Sat Aug 23, 2008 12:51 pm

Please edit
    trigger - .rules
    channel - #channel (use * for every channel)
    filename - scriptpath (scripts/filename
    method - privmsg or notice

Notice: rules have to edited thru its file (rules.txt)
Please report any errors here.

Code: Select all
namespace eval rules {
   namespace eval variable {

      variable trigger ".rules"
      variable channel "#channel"
      variable filename "scripts/rules.txt"
      variable method "privmsg"
   bind PUBM - "$::rules::variable::channel $::rules::variable::trigger*" [namespace current]::public
   proc public {nickname hostname handle channel arg} {
      set file [open $::rules::variable::filename r]
      while {![eof $file]} {
         switch $::rules::variable::method {
            privmsg {
               putmsg $nickname [gets $file]
            notice {
               putnotc $nickname [gets $file]   
      close $file
proof of advance
proof of advance
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: ?rules Script

Postby daveyw » Sat Aug 23, 2008 1:03 pm

Whats the problem to search before you ask this script?
Here you got many results: http://www.egghelp.org/tclhtml/3478-4-0-0-1-rules.htm :D

Re: ?rules Script

Postby jonlar » Sun Aug 24, 2008 11:55 pm

well, i was searching there but thats why i am here. Otherwise, if i all just use the search from the side u offered me we could close this forum ;)

and what sumsar wrote is very good ;)

Re: ?rules Script

Postby Lukemob » Tue Sep 02, 2008 1:59 pm

I think I've already seen this script in another topic..

And jonlar, you're very bad. This forum is to help people with their existing scripts, when they're broken etc.. we'll create a script only when there are very many requests.. But this forum is mainly to help people with scripts, posting already made scripts to make the script database as big as possible and maybe for few people to learn coding too.

Return to TCL Scripting Request

Who is online

Users browsing this forum: No registered users and 0 guests