mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2009
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2009
Posts: 8
Hi, I am very new to all the lingo so I appologise if i dont use the right terminology, I have been given a bot to use in my oasiz chat room and the bot has a script to say "dont stay to long in your cup" when someone clicks their away cup. The problem is, is that it is working for the owners (gold hosts) and the visitors (non hosted) but not for the regular hosts (brown hosts) and I cant figure out why.. this is the copy from the scripts editor of it, i have tried to change it round a bit and it still doesnt work, any help in showing me where the issue is would be greatly appreciated. Oh it has english and french versions, but we only use english.

This is when they click away in chat, its the middle response that doesnt work:


raw 822:*: {
if ($hget($+(prop.,$1),protect) == off) || ($me !isop $1) || ($hget($+(prop.,$1),away) == off) return
if ($nick isowner $1) {
msg $1 $bcn.decode($iif($hget($+(prop.,$1),french) == off,Have fun in your cup - I will guard the room till your return!,Prend ton Temps $nick - Je suis là !))
}
if (hostlist isin $level($address($nick,6))) {
msg $1 $bcn.decode($iif($hget($+(prop.,$1),french) == off,Have fun in your cup $nick - dont stay too long in there!,Prend ton Temps $nick - Je suis là !))
mode $1 -o $nick
}
elseif ($nick !isop $1) {
msg $1 $iif($hget($+(prop.,$1),french) == off,Don't stay to long in your Cup $nick !,Ne soit pas trop Longtemps dans cette Tasse $nick !)
}
}

This is when they come back, again its the middle response that doesnt work:

raw 821:*: {
if ($hget($+(prop.,$1),protect) == off) || ($me !isop $1) || ($hget($+(prop.,$1),away) == off) return
if ($nick isowner $1) {
msg $1 $iif($hget($+(prop.,$1),french) == off,the Boss is Back!,$nick le Patron est de retour !)
}
elseif (hostlist isin $level($address($nick,6))) {
msg $1 $iif($hget($+(prop.,$1),french) == off,Welcome back,Re) $nick
mode $1 +o $nick
}
elseif ($nick !isop $1) {
msg $1 $bcn.decode($iif($hget($+(prop.,$1),french) == off,How was your Coffe $nick?,Comment étais le Caffé $nick ?))
}
}

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Instead of checking if they are host, this script checks if the person is in the hostlist user group. Do you have a menu code for the nicklist that adds someoen to the hostlist user group?

example:
menu nicklist {

}

if (hostlist isin $level($address($nick,6))) {


You can make this:

if ($nick(#,$nick,@)) {

But when they come back they need to be in that "hostlist" user group for the script to know to give them +o.

Joined: Apr 2009
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2009
Posts: 8
Oh ok I see, I do have a hostlist but it is part of the room settings not the bot settings. Mostly I usually make them hosts when they come in the room, however, in saying that, the lady I was testing it on today, is in the room list and gets hosted automatically by the room even when the bot isnt in there. Are you saying I need to create a hostlist for the bot and not rely on the rooms hostlist? Can I make it just for any host and take the hostlist part out of the equation so that anyone who I make a host will get this message, is that what the extra code you added would do?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I think the lady has been added to the room's access list, thus she gets opped upon joining. You may need to delete it. As for
Quote:
Can I make it just for any host and take the hostlist part out of the equation

Just change
Quote:
if (hostlist isin $level($address($nick,6))) {
in 822 and
Quote:
elseif (hostlist isin $level($address($nick,6))) {
in 821
to:
Code:
if ($nick isop $chan) {
in 822 and
Code:
elseif ($nick isop $chan) {
in 821

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
As I said, when they are away an not an op, the only way for mirc to know they should be given op status is if their nick or address is in a list of people who get op status when they come back from being away. (raw 822)

if ($nick isop $1) will only work on raw 821.


On a sidenote:
I dont know about the servers you connect to, but on the ones I do there is no $chan in raw events. Typically $1 is $chan but you can use echo to figure out what you need to do to get the channel name.

Joined: Apr 2009
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2009
Posts: 8
Thanks for this, I will try it out tonight. I use the bot in the Oasiz chat rooms, as I said before I dont know the proper terminology for all this stuff lol.. im just a beginner. I didnt really understand most of what you said about the channels and servers. I am trying to learn though. Thankyou again

Joined: Apr 2009
Posts: 8
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2009
Posts: 8
Hi again, I tried changing them as you suggested but it didnt work. any other suggestions?

Thanks in advance.


Link Copied to Clipboard