mIRC Home    About    Download    Register    News    Help

Print Thread
edit to help script to avoid ops #264976 06/02/19 12:16 PM
Joined: Oct 2014
Posts: 20
O
Orobas Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Oct 2014
Posts: 20
Looking to edit simple ctcp version on join help channel so that it ignores the ops.

Code:
on *:JOIN:#help: {
  set %.ch $chan
  CTCP $nick VERSION
  /notice $nick ctcp version was made so we can be prepared for client based questions on usage and commands.
}
on 1:CTCPREPLY:VERSION*:/onotice #help $nick is using IRC client: $2-

Re: edit to help script to avoid ops [Re: Orobas] #264979 06/02/19 01:56 PM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
The main trick is knowing how long it takes for an op to become opped after they've joined, so your script would have to wait at least that long to give them a chance to op up.

You'll create a queue of nicknames that you've stacked up to VERSION and then work through that queue after the minimum time has elapsed. A good idea is to simply reset the wait-timer in case of heavy join activity, netsplits, or abusive part/join behavior. If the queue list exceeds say 5 or 10 users, then dump it and set a 5 minute cooldown ignore.

As you work through this queue of nicknames, you check if they are '(%nick !isop #help)' before versioning them, otherwise skip and try the next name in the queue if any.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: edit to help script to avoid ops [Re: Raccoon] #264980 06/02/19 02:11 PM
Joined: Oct 2014
Posts: 20
O
Orobas Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Oct 2014
Posts: 20
I've got it Raccoon smile
Thanks for the ideas

Code:
on *:JOIN:#help: {
  set %.ch $chan
  if ($nick isop $chan) { halt }
  else if ($nick !isop $chan)
  .timer 1 3 CTCP $nick VERSION
}
on 1:CTCPREPLY:VERSION*:/onotice #help $nick is using IRC client: $2- | /notice $nick ctcp version was made so we can be prepared for client based questions on usage and commands. 

Last edited by Orobas; 06/02/19 07:51 PM.