This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

chanserv.tcl

Support & discussion of released scripts, and announcements of new releases.
s
simo
Revered One
Posts: 1115
Joined: Sun Mar 22, 2015 2:41 pm

Re: chanserv.tcl

Post by simo »

CrazyCat wrote: Mon Dec 09, 2024 11:45 am simo, read the thread before posting erroreous code !
simo wrote: Mon Dec 09, 2024 10:49 am

Code: Select all

        putserv "ChanServ :aop $chan ADD $targetnick"

        putserv "ChanServ :aop $chan DEL $targetnick"
These 2 lines can work only if the ircd is configured to have an alias of "chanserv".

The proper lines are:
putserv "PRIVMSG ChanServ :AOP $chan ADD $targetnick"

putserv "PRIVMSG ChanServ :AOP $chan DEL $targetnick"
When you do some code, use the real commands, never any alias or shortcut.

The OP said he wants to use this for dalnet and dalnet doesnt use privmsg chanserv they use privmsg ChanServ@services.dal.net and aliases, most other networks use aliases as well btw as privmsg chanserv is not always safe.
User avatar
aslpls
Halfop
Posts: 62
Joined: Mon May 02, 2016 9:41 am

Re: chanserv.tcl

Post by aslpls »

by the way I've tried it in another network with unrealircd.. it is working..

thanks to all of you for contributing some ideas.. maybe it is in different ways as he explained.

anyway, i got it now.. even if the script is not perfect and needs improvement.. but it works as i need it.. cheers to all coders and regular people who helped out.

thanks.
It was FUNNY!
s
simo
Revered One
Posts: 1115
Joined: Sun Mar 22, 2015 2:41 pm

Re: chanserv.tcl

Post by simo »

ive tested it on dalnet and it works fine as well.
User avatar
CrazyCat
Revered One
Posts: 1318
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: chanserv.tcl

Post by CrazyCat »

simo wrote: Mon Dec 09, 2024 12:16 pm The OP said he wants to use this for dalnet and dalnet doesnt use privmsg chanserv they use privmsg ChanServ@services.dal.net and aliases, most other networks use aliases as well btw as privmsg chanserv is not always safe.
So use:
putserv "PRIVMSG chanserv@services.dal.net :AOP $chan ADD|DEL $targetnick
And better: use a variable to set chanserv nick by network.

But if you want to do a reusable script, don't use alias nor shortcut.
User avatar
aslpls
Halfop
Posts: 62
Joined: Mon May 02, 2016 9:41 am

Re: chanserv.tcl

Post by aslpls »

in connection with the script above, i've found another feature to add. If you have another way on how the script works
is much appreciated.

here is a sample code;

Code: Select all

set channel "#aslpls"
set chanserv "ChanServ@services.dal.net"

proc is_valid_channel {channel} {
    return [string match "#*" $channel]
}

proc show_aop_list {channel} {
    global chanserv

    if {![is_valid_channel $channel]} {
        putserv "PRIVMSG $channel :Error: Channel name must start with #."
        return
    }

    putserv "PRIVMSG $chanserv :AOP $channel LIST"

}

bind pub - "!aoplist" show_aoplist

proc show_aoplist {nick host hand channel text} {
    set target_channel [lindex [split $text] 1]

    if {$target_channel eq ""} {
        set target_channel $channel
    }

    show_aop_list $target_channel
}
this is working, but the bot got ignored by

Code: Select all

[14:18:21] Flood from @dal.net!  Placing on ignore!
[14:18:21] Flood from @dal.net!  Placing on ignore!
I need this aop list to show in the channel when you type !aoplist

Code: Select all

user: !aoplist #aslpls
bot: #aslpls aop list: 1. nick1 2. nick2 3. nick3 4. nick4 5. nick5 and so on
It was FUNNY!
User avatar
CrazyCat
Revered One
Posts: 1318
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: chanserv.tcl

Post by CrazyCat »

The placement in ignore is due to your eggdrop.
I recommand to add the network's services in your user list, with the different official hosts they have and +fo flags:

Code: Select all

.+user services *!*@@services.dal.net
.+host services *!*@dal.net
.chattr services +fo
Concerning your initial request, you'll have to bind the notice from chanserv giving you the access list, which is quite hard as there is no special keyword indicating that it's the access list for a particular channel or another notice from chanserv.
User avatar
aslpls
Halfop
Posts: 62
Joined: Mon May 02, 2016 9:41 am

Re: chanserv.tcl

Post by aslpls »

thank you Crazycat, now it is not ignoring..

the list it is only showing from dcc.. anyway for now this is ok.. i'll try to search maybe, and maybe i can find something.. :D
It was FUNNY!
Post Reply