mIRC Home    About    Download    Register    News    Help

Print Thread
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 ] ]     
  }
}

Joined: Aug 2004
Posts: 7,252
R
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.

Joined: Jul 2006
Posts: 242
H
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
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.

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.

Joined: Jun 2005
Posts: 14
X
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.
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 -.-

Joined: Jul 2006
Posts: 242
H
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

Link Copied to Clipboard