| View previous topic :: View next topic |
| Author |
Message |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri Jun 18, 2021 1:36 am Post subject: |
|
|
Thanks for your prompt response @simo
It work out nicely now!
If it can punish (deop the user) who deop or ban the bot nick will be even greater.
|
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Fri Jun 18, 2021 12:57 pm Post subject: |
|
|
try this :
| Code: |
bind MODE - * protect:modes
proc protect:modes {nick uhost hand chan mode target} {
global botnick
if {[isbotnick $nick]} return
if {[matchattr $hand n]} return
switch -- $mode {
"-o" {
if {[isbotnick $target]} { puthelp "chanserv op $chan $botnick" ; puthelp "mode $chan -o $nick" }
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
}
"+b" {
if {![matchaddr $target $::botname]} return
if {[botisop $chan]} { puthelp "mode $chan -b $target" ; puthelp "mode $chan -o $nick" } else { puthelp "chanserv unban $chan $botnick" ; puthelp "chanserv deop $chan $nick" }
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
}
}
}
|
|
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 19, 2021 11:07 am Post subject: |
|
|
edited:
| Code: |
bind MODE - * protect:modes
proc protect:modes {nick uhost hand chan mode target} {
global botnick
if {[isbotnick $nick]} return
if {[matchattr $hand n]} return
switch -- $mode {
"-o" {
if {[isbotnick $target]} {
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
puthelp "chanserv deop $chan $nick"
puthelp "chanserv op $chan $botnick"
}
}
"+b" {
if {![matchaddr $target $::botname]} return
if {[botisop $chan]} { puthelp "mode $chan -b $target" ; puthelp "mode $chan -o $nick" } else { puthelp "chanserv unban $chan $botnick" ; puthelp "chanserv deop $chan $nick" }
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
}
}
} |
|
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Sat Jun 19, 2021 12:15 pm Post subject: |
|
|
My 2 cents: using puthelp "PRIVMSG ChanServ :deop $chan $nick" might be better than puthelp "chanserv deop $chan $nick" as the command chanserv is a server-specific alias. _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sat Jun 19, 2021 12:56 pm Post subject: |
|
|
| CrazyCat wrote: | | My 2 cents: using puthelp "PRIVMSG ChanServ :deop $chan $nick" might be better than puthelp "chanserv deop $chan $nick" as the command chanserv is a server-specific alias. |
Yep! that is correct, although in DalNET(following users above request to make it work for DalNET), you have to either use
Or
| Code: |
puthelp "Chanserv :deop $chan $nick"
|
Hope this helps  _________________ ComputerTech |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 19, 2021 1:27 pm Post subject: |
|
|
| he needed it for dalnet crazycat and dalnet doesnt use: privmsg chanserv |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jun 19, 2021 5:47 pm Post subject: |
|
|
| most networks use aliases tho including dalnet |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sat Jun 19, 2021 8:51 pm Post subject: |
|
|
I personally just use PRIVMSG chanserv@services.dal.net
same with using /cs or or PRIVMSG Chanserv  _________________ ComputerTech |
|
| Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Wed Jun 30, 2021 10:11 am Post subject: |
|
|
Sorry for my late update @simo, it works well so far.
But there is 1 observation, when other op deop in channel it will trigger the bot to perform "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
| simo wrote: | edited:
| Code: |
bind MODE - * protect:modes
proc protect:modes {nick uhost hand chan mode target} {
global botnick
if {[isbotnick $nick]} return
if {[matchattr $hand n]} return
switch -- $mode {
"-o" {
if {[isbotnick $target]} {
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
puthelp "chanserv deop $chan $nick"
puthelp "chanserv op $chan $botnick"
}
}
"+b" {
if {![matchaddr $target $::botname]} return
if {[botisop $chan]} { puthelp "mode $chan -b $target" ; puthelp "mode $chan -o $nick" } else { puthelp "chanserv unban $chan $botnick" ; puthelp "chanserv deop $chan $nick" }
puthelp "PRIVMSG $chan :\002 $nick what you are doing is not helping the smooth running of the channel\002"
}
}
} |
|
|
|
| Back to top |
|
 |
Gulio Halfop
Joined: 01 Nov 2020 Posts: 73
|
Posted: Fri Jul 02, 2021 12:07 am Post subject: hi |
|
|
If u like try this too
| Code: |
bind mode - "*-*o*" self-pro:autoreop
proc self-pro:autoreop {nick uhost hand chan mode target} {
global botnick
if {($target == $botnick)} {
putquick "cs op $chan"
}
}
bind kick - * prot:kick
proc prot:kick {nick uhost handle channel theone arg} {
global botnick
if {[string tolower $theone] == [string tolower $botnick] } {
if {[matchattr handle o]} { return 0 }
putserv "cs unban $channel"
putserv "cs invite $channel"
putserv "join $channel "
pushmode $channel +o $botnick
return 0
}
}
bind mode - "* +b" prot_ban
proc prot_ban {nick uhost hand chan mc ban} {
global botnick botname
if {[string match "$ban" "$botname"]} {
putserv "cs unban $chan $botnick"
} else {
set pnicks ""
foreach user [chanlist $chan b] {
if {[matchattr [nick2hand $user $chan] o]} {lappend pnicks $user}
}
foreach pnick $pnicks {
if {[string match "$ban" "$pnick![getchanhost $pnick $chan]"]} {
putserv "cs unban $chan $botnick"
}
}
}
}
|
|
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jul 03, 2021 1:44 pm Post subject: |
|
|
when a random chanops gets deopped it sends out the text?
that seems odd since its checks if the BOT is deopped and only the BOT |
|
| Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Tue Jul 13, 2021 2:07 am Post subject: |
|
|
Yes, it's weird when other op in the channel deop, it will trigger the message as well. I tried it a few times, it does happen.
For now I comment off the message.
Thanks for following up @simo
| simo wrote: | when a random chanops gets deopped it sends out the text?
that seems odd since its checks if the BOT is deopped and only the BOT |
|
|
| Back to top |
|
 |
|