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 

except deop doesnt work

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


Joined: 01 Nov 2020
Posts: 73

PostPosted: Wed Nov 04, 2020 9:18 pm    Post subject: except deop doesnt work Reply with quote

This script i take here in forum made by ceazar
If can added a simple command to add idle except names like .chanset #chan exceptIdle Name1 Name2 Name3
and to not deop or loop for the chanserv BOT and prefix channel ~ & owner sop
If someone help here to fix it thanks


Code:


.chanset #test +idlemode
<Bot> Successfully set modes { +idlemode  } on #test



Code:


 .chanset #test idletime 60
<Bot> Successfully set modes { idletime { 60 } } on #test.
<Bot> [01:59:12] #John# chanset #test idletime { 60 }



adding names for except deops is not work and is deop and channel Bot
TEST
Code:


<John> .chanset #test "Tommy Clay"
<Bot> Error trying to set "Tommy Clay" for #test, illegal channel option: "Tommy Clay"




Code:


namespace eval idlemode {

   setudef flag idleMode
   setudef str idleExempt
   setudef int idleTime

   bind time {?0 *} [namespace current]::idleTime

   proc idleTime {args} {
      foreach chan [channels] {
         if {![channel get $chan idleMode]} continue
         timedCheck $chan
      }
   }

   proc timedCheck {chan} {
      variable idle
      switch -- [catch {botisop $chan} err] {
         "0" {
            if {!$err} {
               putlog "idleMode error: I'm not oped in $chan channel."
               return
            }
         }
         "1" {
            putlog "idleMode error: $chan channel is not valid."
            return
         }
      }
      set users [string tolower [lrange [chanlist $chan] 1 end]]
      set except [string tolower [channel get $chan idleExempt]]
      set time [channel get $chan idleTime]
      foreach user $users {
         if {[lsearch -exact $except $user] != -1} continue
         if {[isop $user $chan]} {
            lappend checkList $user:1
         }
         if {[isvoice $user $chan]} {
            if {[info exists checkList]} {
               set pos [lsearch -exact $checkList $user:1]
               if {$pos == -1} {
                  lappend checkList $user:2
               } else {
                  set checkList [lreplace $checkList $pos $pos $user:3]
               }
            } else {
               lappend checkList $user:2
            }
         }
      }
      if {[info exists checkList]} {
         foreach ele [split $checkList] {
            scan $ele {%[^:]:%s} user count
            checkIdle $count $user $chan $time
         }
      }
   }

   proc checkIdle {mode user chan time} {
      set idle [getchanidle $user $chan]
      if {$idle >= $time} {
         switch -- $mode {
            "1" {
               pushmode $chan -o $user
               putlog "idleMode: deoped $user in $chan cos was idle for $idle minutes"
            }
            "2" {
               pushmode $chan -v $user
               putlog "idleMode: devoiced $user in $chan cos was idle for $idle minutes"
            }
            "3" {
               puthelp "MODE $chan -ov $user $user"
               putlog "idleMode: deoped and devoiced $user in $chan cos was idle for $idle minutes"
            }
         }
      }
   }
}

Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu Nov 05, 2020 2:47 am    Post subject: Re: except deop doesnt work Reply with quote

Gulio wrote:
Code:

<John> .chanset #test "Tommy Clay"
<Bot> Error trying to set "Tommy Clay" for #test, illegal channel option: "Tommy Clay"


Lol...
Code:
.chanset #test idleExempt "Tommy Clay"

_________________
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
Gulio
Halfop


Joined: 01 Nov 2020
Posts: 73

PostPosted: Thu Nov 05, 2020 3:11 am    Post subject: hi Reply with quote

You will need to activate this on the channels you wish with .chanset #channel +idlemode, define the idle time with .chanset #channel idletime 60 (where 60 in my example means 60 minutes) and if you wish can add an exempt for each channel with .channel set #channel "user_1 user_2"

wrong command here for that sorry

CrazyCat thx for the help
Back to top
View user's profile Send private message
Gulio
Halfop


Joined: 01 Nov 2020
Posts: 73

PostPosted: Thu Nov 05, 2020 3:29 am    Post subject: hi Reply with quote

Is possible to add a code to ignore and not check for prefix channel as ~ &
like ~BoB &Alicia if they change nick need everytime to add nicks exempt
to check and deop only for prefix @ aop like @Tommy
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu Nov 05, 2020 4:56 am    Post subject: Reply with quote

No, it's not possible, the eggdrop doesn't see the opchar, or (to be more precise) doesn't distinguish if @, & or ~ are different levels.
_________________
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
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Nov 05, 2020 5:11 am    Post subject: Reply with quote

What did you set in your eggdrop.conf file at net-type? I think the eggdrop has some built-in functionality to recognize some special modes, but not 100% sure if would work with what you got so you have to test some stuff on your own and reply back with results.

If you got the .tcl command enabled from DCC Chat/Telnet on your bot (if not just lookup unbind dcc n tcl *dcc:tcl or was it #bind dcc n tcl *dcc:tcl?.. anyway, it should be bind dcc n tcl *dcc:tcl and restart the bot afterwards) then try giving yourself only the ~ flag and try in DCC Chat/Telnet with the bot:
Code:

.tcl isop <your nick>
.tcl ishalfop <your nick>

next give yourself the & flag and try the two commands again. Note down the results and reply back with what you found.

From what i know the bot can recognize the '&' sign as halfop on some networks, not sure about others.

Edit: From what I could find UnrealIRCd has the prefix '~' as the 'owner of the current channel' and the prefix '&' as 'admin (SOP) on the current channel' and both are equivalent of @ on other networks, so should see something with isop.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Gulio
Halfop


Joined: 01 Nov 2020
Posts: 73

PostPosted: Thu Nov 05, 2020 6:43 am    Post subject: Reply with quote

Sorry for my late report this is what is show
is better to add del list prefix channel we want to check idle for deop

Code:


[12:39:04] <Teddy> .tcl isop Teddy
[12:39:04] <Bot> Tcl: 1
[12:39:22] <Teddy> .tcl ishalfop Teddy
[12:39:22] <Bot> Tcl: 0
[12:40:08] <Teddy> .tcl isop Teddy
[12:40:08] <Bot> Tcl: 1
[12:40:27] <Teddy> .tcl isop Teddy
[12:40:27] <Bot> Tcl: 1
[12:40:39] <Teddy> .tcl isowner Teddy
[12:40:39] <Bot> Tcl error: wrong # args: should be "isowner nick chan"
[12:40:52] <Teddy> .tcl isowner Teddy #test
[12:40:53] <Bot> Tcl: 1



Last edited by Gulio on Thu Nov 05, 2020 6:48 am; edited 1 time in total
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Nov 05, 2020 6:45 am    Post subject: Reply with quote

What flags did Teddy have when you did each of the commands?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Gulio
Halfop


Joined: 01 Nov 2020
Posts: 73

PostPosted: Thu Nov 05, 2020 6:50 am    Post subject: Reply with quote

this are the flags +iwrxzt

if u ask for prefix channel access are this
Owner ~Teddy
sop &Teddy
aop @Teddy
halfop %Teddy

if u mean flags on Bot dont have nothing
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Nov 05, 2020 7:02 am    Post subject: Reply with quote

No, i meant flags on the channel.

Ah, as suspected.

Well, given that isop recognizes the special flags as a regular @ there's no way to add them to a special exception list without breaking the purpose of the script itself, meaning removing the @ and v from those that are idle.

At this point the only option I could think of would be creating a 'special' user and add their hosts to this user and except everyone matching this particular user.
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Thu Nov 05, 2020 7:05 am; edited 1 time in total
Back to top
View user's profile Send private message
Gulio
Halfop


Joined: 01 Nov 2020
Posts: 73

PostPosted: Thu Nov 05, 2020 7:05 am    Post subject: Reply with quote

Idle can be and owner and sop ~ & and with to set mode -oo Owner Sop
If they change nick need to add every nick they have in group of nicks


yes and this can be for owner sop to exep them from *!*@host or *!*@*.domain.com
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