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.

on / off switch via console

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

on / off switch via console

Post by Elfriede »

Hi everyone :)

Hopefully someone can help me on that. Ive a small script, that needs an on/off switch for a specific command.

In the following example id like to have eg:

.chanset !this off

like this :)

Code: Select all

proc beta_recv    {from command text} {
	set type [lindex [split $text] 0]
	switch $type {
		"!this"   { sendmsg #chan "$text" }
		"!that"   { sendmsg #chan "$text" }
		"!somethg"   { sendmsg #chan "$text" }
	}
}
Would be awesome, if someone would write that for me :)

Thanks a lot
J
Johannes13
Halfop
Posts: 46
Joined: Sun Oct 10, 2010 11:38 am

Post by Johannes13 »

setudef flag !this

set it with .chanset +!this or .chanset -!this

check it in the script with [channel get $channel !this]
Post Reply