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.

Pcw Request Relayer

Old posts that have not been replied to for several years.
Locked
x
xG

Pcw Request Relayer

Post by xG »

Lo all,

I was jus wondering if some of you guys cud help me with a tcl script, what i am looking for is a !war or !pcw request/relayer.

Basically how it works is wen some types !pcw 5v5 dust2 gotserver it will add this message and relay it, in whichever chan the eggdrop is in. Also an !rem war function makes things a lot easier, so like if the wars requested where done in numbers so an Op cud jus time !remwar #1

Thanks For any Help.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

For this what you can do is:
!pcw 5v5 dust2 gotserver

Code: Select all

#Usage:
!pcw 5v5 dust2 gotserver <message>

bind pub - !pcw pcw

proc pcw {nick uhost hand chan text} {
 if {([string equal "5v5" [lindex $text 0]]) && ([string equal "dust2" [lindex $text 1]]) && ([string equal "gotserver" [lindex $text 2]]) && ([lindex $text 3] != "")} {
 foreach c [channels] {
  putserv "PRIVMSG $c :[lindex $text 3]"
  }
 return 0
 }
}
For the !war stuff, you have to be a bit specific and give a good clear purpose of what that trigger has todo.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
x
xG

Post by xG »

Basically i need a script like you would find in #warfinder..

So when some1 types !pcw it relays their message with requesters name added at end. So people can refer back 2 it..

Check out #warfinder, they av a gud example. It is quite hard 2 explain.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

I think, this is what you are looking for then.

Code: Select all

#Usage: 
!pcw <message> 

bind pub - !pcw pcw 

proc pcw {nick uhost hand chan text} { 
 if {([lindex $text 0] != "")} { 
 foreach c [channels] { 
  putserv "PRIVMSG $c :[lrange $text 0 end] - \[Requested by: $nick\]" 
  } 
 return 0 
 } 
} 
Anything you type after the trigger !pcw, the bot will message that text to all the channels it is on. I hope this helps. It will also give the requested persons nick in the end. You can modify the format of the message if you like! :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
x
xG

Hmm

Post by xG »

Just one thing, can there be like a lvl 50 access for ops so admins can del spam posts etc.. ?

Soz bout that.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

You can bind to specific flags.
Those specific flags then can only trigger !pcw.

Example:
bind pub -|- !pcw pcw

Flags: -|-
channel|global flags are matched

#bind pub of|of !pcw pcw
#bind pub mn|mn !pcw pcw
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked