egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

unlock channel with pub command

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Wed Jul 22, 2020 9:47 am    Post subject: unlock channel with pub command Reply with quote

i was trying this out to check channel modes and remove if present
it works fine for the first few modes but not for the channel modes that have a second parameter like:

+k secretkey
it wont accept a mode #channel -k
it needs the key as well to get removed

it wont accept a mode #channel -k key

using this atm:


Code:

bind pub -|- .unlock pub:checkcmodez

proc pub:checkcmodez {nick host hand chan text} {
       if { [string first R [getchanmode $chan]] != -1} {  pushmode $chan -R  }
       if { [string first i [getchanmode $chan]] != -1} {  pushmode $chan -i  }
       if { [string first M [getchanmode $chan]] != -1} {  pushmode $chan -M  }
       if { [string first l [getchanmode $chan]] != -1} {  pushmode $chan -l  }
       if { [string first k [getchanmode $chan]] != -1} {  pushmode $chan -k  }
}




also when using the [getchanmode $chan]
it doesnt seem to show all set cjannelmodes

for example i have set this on channel:

+BCEFGJPTUWfjknrtx block:30:90 ~1:10 3:3 5 c4:2 ~3:2 4:2 jhjhd 1:10:10


yet [getchanmode $chan] shows just : +CtrTnkl jhjhd 33

whats the reason for that is it the channelmodes arent part of what eggdrop recognizes as its default core channel modes and if so would there be a way to display all parameters of the set channel modes ?
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Wed Jul 22, 2020 10:14 am    Post subject: Reply with quote

getchanmode sees only the RFC1459 modes.
MenzAgitat creates a little hack for that: https://forum.eggdrop.fr/Alternative-a-getchanmode-car-celui-ci-ne-voit-que-les-modes-du-RFC1459-t-1437.html

Sorry, the forum and explanations are in french Smile
_________________
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
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Wed Jul 22, 2020 10:24 am    Post subject: Reply with quote

thanx crazycat im not sure how to use that tho for example to check for certain cmodes
Back to top
View user's profile Send private message
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Wed Jul 22, 2020 10:39 am    Post subject: Reply with quote

ive added it to tcls but im not sure how to use this tho
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber