Jump to content

Cup Commands Help Please


tzrtim

Recommended Posts

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 by tzrtim
Link to comment
Share on other sites

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 :)

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...