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.

AMSG Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
e
elite23q
Voice
Posts: 4
Joined: Fri Nov 02, 2007 6:53 pm

AMSG Script

Post by elite23q »

Can someone code me an AMSG script?

the bind being .amsg

Thanks :) <3
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Whats it supposed to do?
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

rosc2112 wrote:Whats it supposed to do?
Something like this, I guess:

Code: Select all

# If your network supports multiple targets for PRIVMSG, use this one:
set amsg_max_targets 6
proc amsg msg {
	set m $::amsg_max_targets
	set t {}
	foreach c [channels] {
		if {[botonchan $c]&&[llength [lappend t $c]]==$m} {
			puthelp "PRIVMSG [join $t ","] :$msg"
			set t {}
		}
	}
	if {[llength $t]} {
		puthelp "PRIVMSG [join $t ","] :$msg"
	}
}

# if it doesn't, use this (slower):
proc amsg msg {
	foreach c [channels] {
		if {[botonchan $c]} {
			puthelp "PRIVMSG $c :$msg"
		}
	}
}

# dcc interface to the amsg proc
bind dcc n|- amsg dccamsg
proc dccamsg {h i a} {amsg $a}
(not tested)
Have you ever read "The Manual"?
e
elite23q
Voice
Posts: 4
Joined: Fri Nov 02, 2007 6:53 pm

Post by elite23q »

It's supposed to spam in every channel the Bot is idling.

And not .amsg via DCCCHAT .amsg while in #channel
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Code: Select all

bind pub n|- .amsg pubamsg
proc pubamsg {n u h c a} {amsg $a}
Have you ever read "The Manual"?
Post Reply