mIRC Home    About    Download    Register    News    Help

Print Thread
only identified people are greeted #166064 05/12/06 08:19 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
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 ] ]     
  }
}

Re: only identified people are greeted [Re: moshkin] #166093 06/12/06 05:05 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: only identified people are greeted [Re: moshkin] #166123 06/12/06 07:33 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
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))
}


Newbie
Re: only identified people are greeted [Re: HaleyJ] #166738 14/12/06 05:31 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
its not setting new greets anymore.

Re: only identified people are greeted [Re: moshkin] #167149 20/12/06 04:51 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
its not setting new greets anymore.

Re: only identified people are greeted [Re: moshkin] #167195 21/12/06 04:35 AM
Joined: Jun 2005
Posts: 14
X
Xiad Offline
Pikka bird
Offline
Pikka bird
X
Joined: Jun 2005
Posts: 14
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.

Last edited by Xiad; 21/12/06 05:07 AM.
Re: only identified people are greeted [Re: Xiad] #167330 22/12/06 01:57 PM
Joined: Oct 2006
Posts: 60
M
moshkin Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Oct 2006
Posts: 60
the original script is bollucked up now, and wont work properly -.-

Re: only identified people are greeted [Re: moshkin] #167332 22/12/06 02:35 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
So just repaste it in and delete the old one. also make sure its not conflicting with another ON text event.


Newbie