|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Hello there I search throught the forum and couldn't find anything similar (though im not good at looking lol) I want to make a on TEXT that reacts in a dcc chat window, something like: on @10:TEXT:!op: dcc: { command } So, whenever a person level 10 types !op in the DCC Chat window of the bot, this will op him. I tried using the ? for private chats, but it didnt work. Can anyone help me? Thanks, Zyzzy.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on *:chat:!op:{ echo -s =$nick just said !op ! }
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Oh, never thought of that I changed the script and replaced ctcp for on *:Chat - but still doesnt work. I tried your example and it did work, so im thinking its my script. on 900:chat:disable *: {
if ($$2 == FloodKick) { .disable #FloodKick | .notice $nick Flood Kick has been deactivated! }
elseif ($$2 == SwearKick) { .disable #SwearKick | .notice $nick Swear Kick has been deactivated! }
elseif ($$2 == BadIP) { .disable #Badip | .notice $nick Bad IP Kick has been deactivated! }
else .notice $nick Option unavailable, try again please. Options are: FloodKick SwearKick BadIP PartKick BadNick
} 900 would be the SOP level, while the Owner (which is set to my IP) is 1000. What's wrong with this?
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
I added the = before the $nick, but still doesnt work..
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on 900:chat:disable *:{ echo -s =$nick said $1- | return } check that the event is actually being called, tell me what it echo's (if anything)
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi,
he is using $nick in a correct way, as u only need =$nick to msg to that chat box.
From the help file:
on 1:CHAT:boo!:/msg =$nick Boo back at ya!
This triggers when someone in a dcc chat window says boo! The equal sign in =$nick is required to send the reply as a dcc chat message. If no equal sign is used, the message is sent as a private irc server message.
.notice $nick is just fine.
Regards
Gone.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
ah ok, i never use dcc chats, i'm just using what it says in the help file
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi zizzy,
the best thing you can do if a script of yours is not working, is to debug it. In other words, try to find out what exactly isn't being processed.
You could first of all remove the . from .notice, that way u will actually see immediately if it noticed or not.
You could also put something like:
on 900:CHAT:disable *:{ echo -a Triggered the on chat ... echo -a Made it to the end of remote on chat }
You could also first try without any user levels, like on *:CHAT to see if the bug is inherent to ur scripting, or simply to the fact that the user levels are wrongly put.
You see where im going with all this :tongue:
Regards
Gone.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
on 1:CHAT:!op { if ($nick == your_friend) is that what you looking for ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
I tried without the user levels and it worked! Well.. it half worked lol. Without the level, the script did disable the #group, but it didnt send a /notice back. I changed from /notice $nick to /msg =$nick and now is working fine. Now, since it doesnt work with on 900:CHAT - i tried like this:
on *:900:CHAT:disable *: {
if ($ulevel >= 900) {
if ($$2 == FloodKick) { .disable #FloodKick | .msg =$nick Flood Kick has been deactivated! }
elseif ($$2 == SwearKick) { .disable #SwearKick | .msg =$nick Swear Kick has been deactivated! }
}
} And no response. Edited: I tried the dubugging method of echos, with that inicial script (with the user level) - the script never recognized the user with level 900.Seems like the CHAT doesn't work with User Levels..... sparta --> I tried with that if ($nick == nickname) but nothing..
Last edited by Zyzzyx26; 11/04/04 04:47 PM.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on *:chat:disable *:{ if $level($nick) == 900 { } }
New username: hixxy
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
on *:chat:disable *:{ if $level($nick) == 900 { } } Still nothing... With the echo debugging method the script didnt recognize the user as 900, again.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hey, show me a part of ur user list, as it may just be that u didnt set the users correctly, which would then make it natural that they do not trigger on the on chat event. Also since the notice doesnt work, it might be cuz u have a custom made 'notice' alias in ur script. Try to use !.notice instead of .notice, that will make mirc use its built in 'notice' alias. Also are you testing this on a clean mirc client? For future reference, if u are using a script like Invision or whatever script, or u have a lot of addons and stuff loaded, try to do testing on a clean mirc client, as then ur sure that no other script will interfere. Thats how i always do it, i have a client that i use for chatting, and another one just for testing purposes. Just some tips for the future Regards
Gone.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Im building a very very very simple bot, just to fool around with the scripts and challenge myself So i've got 2 mIRC clients in my PC: The one i use to chat, with PnP and the other one with the bot, clean, with only simple scripts i've made.. Those simple scripts are Swear kicks, Flood kicks, bad ip/nick kicks and some remote control of the bot, so i dont think they should be interfeering with the Chat thingie.. In the bot userlist there's just 1 user, me, that goes like this: 1000:*!*@Zyzzyx26.users.undernet.org Owner Since its undernet and i have a reg. username, i dont need to add anything but the Undernet IP...so it should recognize me. Edited --> The !.notice thing worked, the bot does send the /notice back, telling that the feature was disabled.
Last edited by Zyzzyx26; 11/04/04 05:11 PM.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
I tried it with a few variations to get the level of the user who DCC's, but nothitng.. Could that be a bug, maybe?
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Maybe set a var from the ctcp chat event to compare :chat: events against. ctcp 900:dcc chat:{
; this triggers on level 900 or above, $ulevel should always be the users actual level. (I think :D)
; so set a var to the users level
set %chat. $+ $nick $ulevel
}
on *:chat:.disable *:{
if %chat. [ $+ [ $nick ] ] == 1000 {
if $2 == FloodKick { .disable #FloodKick | .msg =$nick Flood Kick has been deactivated! }
elseif $2 == SwearKick { .disable #SwearKick | .msg =$nick Swear Kick has been deactivated! }
}
}
on *:close:=:if %chat. [ $+ [ $nick ] ] { unset -s %chat. $+ $nick }
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Oh, that works great! Here's the final script: on *:chat:disable *: {
if %chat. $+ $nick {
if ($$2 == FloodKick) { .disable #FloodKick | msg =$nick 7Flood Kick has been deactivated! }
elseif ($$2 == SwearKick) { .disable #SwearKick | msg =$nick 7Swear Kick has been deactivated! }
elseif ($$2 == BadIP) { .disable #Badip | msg =$nick 7Bad IP Kick has been deactivated! }
elseif ($$2 == PartKick) { .disable #PartKick | msg =$nick 7Join/Part Kick has been deactivated! }
elseif ($$2 == BadNick) { .disable #BadNick| msg =$nick 7Bad Nick Kick has been deactivated! }
else msg =$nick 7Option unavailable, try again please. Options are: FloodKick SwearKick BadIP PartKick BadNick
}
}
on 900:JOIN:#: {
set %chat. $+ $nick
}
on 900:PART:#: {
unset %chat. $+ $nick
}
on 900:QUIT: {
unset %chat. $+ $nick
} There's also the Enable version of this It works great, thank you!
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Well, that won't work properly as it is. if %chat. $+ $nick is true for all nicks, type //if %chat. $+ $time { echo -a $ifmatch } and you will see why. if %chat. [ $+ [ $nick ] ] <-Use this to enable only if the var is actually set. The var should have a value for the script to work. on 900:join:#:{
[color:indigo]inc %chat $+ $nick[/color]
} See this thread for more info on dynamic vars.
|
|
|
|
|