mIRC Homepage
Posted By: moshkin only identified people are greeted - 05/12/06 08:19 PM
How do i get this to only work for people that have identified as people can just change their names to anything and set it, also if they set it to !kb username then when they come in my bot says that and the other bot actually kick bans the username they put in so i have members coming in and kicking other members out frown any help would be apreciated.

Code:
 on *:TEXT:!greet*:#: {
  if ($2 == $null) {
    /notice $nick You need to type your greet next to !greet. Ex. !greet Hey
  }
  else {
    set %greet. [ $+ [ $nick ] ] $2-
    /notice $nick You have just set your greet to %greet. [ $+ [ $nick ] ]
  }
}
on *:JOIN:*: {
  if (%greet. [ $+ [ $nick ] ] == $null) {
    /notice $nick You do not have a greet set. Type !greet <greethere>
  }
  else {
    /msg # %greet. [ $+ [ $nick ] ]     
  }
}
Posted By: RusselB Re: only identified people are greeted - 06/12/06 05:05 AM
The easiest way to restrict it to those that have identified for their nicks, is to set the channel mode +R (UnrealIRCd, and I think most if not all others). The one problem that this creates, is the fact that non-registered users on the network won't even be able to join the channel.

As to the !kb command being run, edit your !kb script to check if the nick sending the command is the bot running this script and if it is, then ignore the command. Alternatively, you could put this script on the other bot, then it won't conflict, since your bot won't recognize the message being sent since it's sending it.
Posted By: HaleyJ Re: only identified people are greeted - 06/12/06 07:33 PM
this should rectify all your problems. i use $wildsite so nick changing wont help and another plus to it is that if a user changes to another nick your bot will be clever enough to still give a personal greet as it users the address of the nick.
i also used $replace so that your bot does not kick ban users. any problems please let me know

Code:
ON *:TEXT:!greet*:#: {
  if (!$2) {
    .notice $nick You need to type your greet next to !greet. Ex. !greet Hey
  }
  else {
    set $+(%,greet,$wildsite),2) $replace($2-,$chr(32),$chr(160))
    .notice $nick you have succesfully set your greet to $2-
  }
}

ON !*:JOIN:#: {
  $iif(!$($+(%,greet,$wildsite),2),.notice $nick You do not have a greet set type !greet.,msg # $($+(%,greet,$wildsite),2))
}
Posted By: moshkin Re: only identified people are greeted - 14/12/06 05:31 PM
its not setting new greets anymore.
Posted By: moshkin Re: only identified people are greeted - 20/12/06 04:51 PM
its not setting new greets anymore.
Posted By: Xiad Re: only identified people are greeted - 21/12/06 04:35 AM
I believe the check you need to use is 'isreg', I'm unsure how to implement it atm, working on it. smile

My bad.. misread something.. isreg is the normal user check.
Posted By: moshkin Re: only identified people are greeted - 22/12/06 01:57 PM
the original script is bollucked up now, and wont work properly -.-
Posted By: HaleyJ Re: only identified people are greeted - 22/12/06 02:35 PM
So just repaste it in and delete the old one. also make sure its not conflicting with another ON text event.
© mIRC Discussion Forums