This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

how to remove channel appearing

Help for those learning Tcl or writing their own scripts.
Post Reply
r
redtube
Voice
Posts: 10
Joined: Wed Mar 01, 2006 4:01 pm

how to remove channel appearing

Post by redtube »

I have the following very small tcl script that when calling up displays the channel before it then goes on to show whats in a separate txt file

something like this:
[17:11] -car3327:#tube- The Rules of Channel <channel name here>[17:11] -car3327:#tube-
[17:11] -car3327:#tube- 1. There is to be no disrespect or mockery of religions creed or faiths. etc etc..

I want the channel part not to be shown so that it just shows

[17:11] -car3327:The Rules of Channel <channel name here>
[17:11] -car3327:#tube-
[17:11] -car3327: 1. There is to be no disrespect or mockery of religions creed or faiths.

How can I get rid of the channel name coming up?

Code: Select all

# This sets the location of the file you want to be written out to someone in a msg
set bfile "/home/breeze/eggdrop/text/rules.txt"

#sets the command it should go on off in a chan or so
set cmd "!rules"

#this is where you set where the file should be printed out
#private = 0
#channel = 1
set bwhere 1

## don't edit below this line -----------------------------------
bind pub -|- $cmd dumpfile
proc dumpfile {nick handle host chan text } {
global bfile bwhere
set foo [open $bfile r]
while { ! [eof $foo] } {
        set line [gets $foo]
                if {!$bwhere} {
                puthelp "NOTICE $nick :$line"
                } else {
                puthelp "NOTICE $chan :$line"
                }
        }
}
putlog "Rules of #mideast written by MidEast"
-----------------end--------------

thanks
Dave R.
west London uk
Last edited by redtube on Mon Aug 07, 2006 3:57 pm, edited 2 times in total.
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

just open this file

Code: Select all

/home/breeze/eggdrop/text/rules.txt
and change the text inside

ps. use

Code: Select all

 tags when posting scripts / snippets
r
redtube
Voice
Posts: 10
Joined: Wed Mar 01, 2006 4:01 pm

Post by redtube »

I've looked at the rules.txt and example of what it contains below
The Rules of Channel <channel name here>
1. There is to be no disrespect or mockery of religions creed or faiths. We encourage Healthy criticism based on ideas or facts which must be well respected. Any breach of this rule will be considered a major infringement of Mideast Channel and serious consequences will result by the Manager.
2. You can say what you want, what you think, but you MUST respect others viewpoint. In short words: DO NOT INSULT!
3. You can announce, such as what music your are listening to. Links(URL'S) allowed to reputable bona fide sites only! That means no porn or sex sites.
but the call up shows the channel name that its being called in for every line of the rules, like this:
20:46] <TOCentral> !rules
[20:46] -car3327:#tube- The Rules of Channel <channel name here>
[20:46] -car3327:#tube- 1. There is to be no disrespect or mockery of religions creed or faiths. We encourage Healthy criticism based on ideas or facts which must be well respected. Any breach of this rule will be considered a major infringement of Mideast Channel and serious consequences will result by the Manager.
[20:46] -car3327:#tube- 2. You can say what you want, what you think, but you MUST respect others viewpoint. In short words: DO NOT INSULT!
[20:46] -car3327:#tube- 3. You can announce, such as what music your are listening to. Links(URL'S) allowed to reputable bona fide sites only! That means no porn or sex sites.
I want to know how to remove the channel name on whatever channel its called up on so that it comes out like this:
20:46] <TOCentral> !rules
[20:46] -car3327:- The Rules of Channel <channel name here>
[20:46] -car3327: 1. There is to be no disrespect or mockery of religions creed or faiths. We encourage Healthy criticism based on ideas or facts which must be well respected. Any breach of this rule will be considered a major infringement of Mideast Channel and serious consequences will result by the Manager.
[20:46] -car3327: 2. You can say what you want, what you think, but you MUST respect others viewpoint. In short words: DO NOT INSULT!
you will see, above,no channel name preceeding each rule number.
Any ideas on how to do this looking once again at the tcl script ?
cheers
Dave R
west London UK
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

ok, i didn't quite understand what you wanted at first.

you might want to reconsider editing your config

Code: Select all

set bwhere 1
will send the rules to the whole channel via notice (hence the channel appearing)
if you want to send it (and i think you do) only to the user who typed !rules use

Code: Select all

set bwhere 0
r
redtube
Voice
Posts: 10
Joined: Wed Mar 01, 2006 4:01 pm

Post by redtube »

my goodness this has done the trick, really kind of you
thanks very much
regards
Dave R
west London UK
Post Reply