Skip to content
General IRCd

Cup Commands Help Please

A TG007 community discussion started by tzrtim.

Discussion 4 posts
Page 1 of 1
Open
Topic #12121 · 4 published posts · 1,616 views

Sorry if anything is weird about the post below!

 

We have setup a irc chan for a Cup, I want them to be able to submit the score in a format like : !Score : Team-X 13 vs Team-Z 5 and for the reply to go into another channel? - Am New to mIRC and our cup is for 64 teams! - Any help would be great

 

 

on :TEXT:score*:?:/msg #adminchan $2- | .timer 2 1 /msg $nick Thanks $Nick the score $2- has been added (i've tried on 1:NOTICE:*score*:?:/ ) aswell

 

 

Also for a flood control on input per nick just incase someone floods the command - I've tried and looked over the help file :(

Edited Feb 25, 2009 11:08 AM by tzrtim

not at home so excuse my coding but

 

on *:TEXT:*!score*:*: { msg #adminchan $1- }

Spam Honeypot - http://www.haggistech.co.uk/honey(humans do not register)

Hello,

 

I hope this helps, it includes a basic flood protection which you can tweak.

 

alias flood.check {
  if (!%fld. [ $+ [ $1 ] ] ) { set -u5 %fld. [ $+ [ $1 ] ] 1 }
  if (%fld. [ $+ [ $1 ] ] ) {
    inc %fld. [ $+ [ $1 ] ]
    if (%fld. [ $+ [ $1 ] ] > 4) { return false }
  }
  return true
}

on *:TEXT:!score*:#:{
  if ( $flood.check($nick) == true ) {
   ;; We are OK, let them proceed
  }
  else {
   ;; They are flooding, abort!
  }
}

 

I rarely use/code mIRC so I'm sure someone else will come up with a neater/better solution, but it does the job anyhow :)

 

Enjoy a bit of MSN Chat nostalgia? You'll love our fun retro webchat page!

on *:text:!score *:*:{
  if (%score. [ $+ [ $nick ] ] > 3) return
  msg #adminchan $2-
  msg $nick Thanks $Nick the score $2- has been added
  inc -u4 %score. [ $+ [ $nick ] ]
}

It's pretty simple. You just count whenever they send you a message. /inc -u4 %score. [ $+ [ $nick ] ]

 

Then you only allow their request if their total messages is greater than ... I chose 3.

 

Notice doesnt use the ? (Query) window. Its for the channel only.

 

You don't need help storing the information?