mIRC Home    About    Download    Register    News    Help

Print Thread
Kindly ...i need help with this code Please #267495 18/07/20 03:54 PM
Joined: Jul 2020
Posts: 1
J
Jan2020 Offline OP
Mostly harmless
OP Offline
Mostly harmless
J
Joined: Jul 2020
Posts: 1
Hey Guys Long time

I have been absent for no more than seven years, and I cannot remember much about the New of "mSL". I hope from the experts to convert this code and that the posting be in the channel and not on the private WINDOW,I need who join channel with access @op notice channel why this nickname or user @op and /cs why #channel nick have access like this one ...
need it work for example in depend of any channel and access Sop or Aop :need it work for example in depend of any channel and access Sop or Aop :
@chanbot> Jan` has AOP access to #blahblah. Reason: Identification to the nickname Jan`.


and thanks for help

Old code is :

On ^*:NOTICE:*:?:{
if ($nick = NickServ) || ($nick = MemoServ) || ($nick = ChanServ) {
}
else {
if ($window(@Notices) = $null) { window @Notices }
echo @Notices $atime 3 (Private)Notice1 4Nick1:2 $nick 1 4MSG1: $1-
halt
}

if ($nick != chanserv) || ($nick == $me) { goto end }
if ($nick == chanserv) {
if (*has NO access to* iswm $strip($1-)) {
Window -ng2 @Why
ALINE 1 @Why 6ChanServ Why This Nick iS Op ChanneL ( $time ) - ( $date )
ALINE 1 @Why 4*** $1 has has NO access to $6
haltdef
}
if (Identification isin $1-) && (access isin $1-) && (Reason isin $1-) {
Window -ng2 @Why
ALINE 1 @Why 6ChanServ Why This Nick iS Op ChanneL ( $time ) - ( $date )
ALINE 1 @Why *** 4 $+ $1-6 $+
ALINE 1 @Why *** 12 $+ $7- $+
haltdef
}
}
:end
}

Re: Kindly ...i need help with this code Please [Re: Jan2020] #267498 20/07/20 04:14 AM
Joined: Jan 2004
Posts: 1,339
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,339
I assume you want the new destination in channel to be an echo which only you see, because sending a message/notice to channel which others see can cause you to be disconnected for spamming. In place of

aline 1 @why

you can use

echo -g $chan

The -g keeps the echo from going to your disk .log file.

Note that there is a little bit of a logic problem in this line:

if ($nick != chanserv) || ($nick == $me) { goto end }

This branches to "end" always except when your own nick is chanserv which should never happen. I'm guessing that you really want this to branch only if nick is $me. Instead of branching to a do-nothing label, it's probably simpler to just use "return" which quits the event handler with no further action.