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 

ident ban instead of hostban if irccloud user
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
simo
Master


Joined: 22 Mar 2015
Posts: 251

PostPosted: Sun Jun 03, 2018 11:55 am    Post subject: ident ban instead of hostban if irccloud user Reply with quote

i was wondering if this could be changed to check for irccloud users and
set bans on +b *!ident@* and for non irccloud to set a regular ban *!*@host

Code:
bind pub o|o !kb2 pubm:kickban2
proc pubm:kickban2 {nick host hand chan text} {
   set text [split $text]
   set whom3 [lindex $text 0]
   set reason "Requested"
   if {[llength $text]>1} { set reason [join [lrange $text 1 end]] }

   if {[set chost [getchanhost $whom3 $chan]] ne ""} {
      set mask3 [maskhost "$whom3!$chost" 2]
      putquick "NOTICE $nick :Kick and Ban $whom3 ($mask3) ------- With Reason: $reason"
      putserv "MODE $chan +b $mask3"
      putserv "KICK $chan $whom3 :$reason"
   } else {
      putquick "NOTICE $nick :$whom3 is not on $chan"
   }
}



for example if someone with host
~sid95262@highgate.irccloud.com is on channel to get *!~sid95262@*

and if someone with host uid300068@id-300068.charlton.irccloud.com to get *!uid300068@* to use to set a ban on

and if someone with a regular host like Mibbit@c-71-231-192-20.hsd1.wa.comcast.net to get *!*@c-71-231-192-20.hsd1.wa.comcast.net
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Sun Jun 03, 2018 8:28 pm    Post subject: Reply with quote

Code:

bind pub o|o !kb2 pubm:kickban2

proc pubm:kickban2 {nick host hand chan text} {
  set text [split $text]
  set whom3 [lindex $text 0]
  set reason "Requested"
  if {[llength $text]>1} { set reason [join [lrange $text 1 end]] }

  if {[set chost [getchanhost $whom3 $chan]] ne ""} {

    if {[string match "*.irccloud.com" $chost]} {
      set mask3 *![lindex [split $chost @] 0]@*
    } else {  set mask3 [maskhost "$whom3!$chost" 2]  }

    putquick "NOTICE $nick :Kick and Ban $whom3 ($mask3) ------- With Reason: $reason"
    putserv "MODE $chan +b $mask3"
    putserv "KICK $chan $whom3 :$reason"
  } else {
    putquick "NOTICE $nick :$whom3 is not on $chan"
  }
}


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
simo
Master


Joined: 22 Mar 2015
Posts: 251

PostPosted: Mon Jun 04, 2018 8:45 am    Post subject: Reply with quote

works excellent thnx again for your swift response and working code SpiKe^^ Smile

much apreciated as always
Back to top
View user's profile Send private message
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Mon Jun 04, 2018 6:05 pm    Post subject: Hello Reply with quote

Can u do it to make this script eggdrrop to ban only with command !b nick 5
to put the time of ban 5 10 30m 1h 2h

and how to make to give gline on ident of irccloud like u make it for kb and to quit user from server with command channel !g nick Out
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Tue Jun 05, 2018 7:00 am    Post subject: Reply with quote

And for ban with time command !b nick 5 on min
and for gline !g nick Out ....... user quit from server
can u write the code pls , thx in advance
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Wed Jun 06, 2018 5:55 pm    Post subject: Reply with quote

Stefano1990 wrote:
Can u do it to make this script eggdrrop to ban only with command !b nick 5
to put the time of ban 5 10 30m 1h 2h


Try this..
Code:

################  Use the default kick reason:  Requested  ################
# !kb ted          :kick & ban ted  (this script doesn't remove this ban)
# !kb ted 20       :kick & ban ted  (remove ban in 20 minutes)
# !kb ted 20m      :kick & ban ted  (remove ban in 20 minutes)
# !kb ted 90s      :kick & ban ted  (remove ban in 90 seconds)
# !kb ted 4h       :kick & ban ted  (remove ban in 4 hours)
# !kb ted 1d       :kick & ban ted  (remove ban in 24 hours)

################  Use a custom kick reason  ################
# !kb ted Damn spammer   :kick & ban ted  (kick reason:  Damn spammer)
# !kb ted 20 stop that   :kick with reason: stop that (ban for 20 minutes)

################  Do just a kick, or just a ban  ################
# !k ted                :kick ted with default reason:  Requested
# !k ted Damn spammer   :kick ted with reason:  Damn spammer
# !b ted                :ban ted  (this script doesn't remove this ban)
# !b ted 1h             :ban ted  (remove this ban in 1 hour)



bind pub o|o !kb pubm:kickban
bind pub o|o !k pubm:kick
bind pub o|o !b pubm:ban

proc pubm:kick {nick host hand chan text} {
  pubm:kickban $nick $host $hand $chan $text k Kick
}
proc pubm:ban {nick host hand chan text} {
  pubm:kickban $nick $host $hand $chan $text b Ban
}


proc pubm:kickban {nick host hand chan text {do kb} {say "Kick and Ban"} } {
  set text [split [string trim $text]]
  if {![llength $text]} {
    puthelp "NOTICE $nick :Must provide a target nick to $say."
    return 0
  }
  set text [lassign $text whom]
  if {[isbotnick $whom] || ![botisop $chan] || [matchattr [nick2hand $whom $chan] mn]} {
    return 0
  }
  if {[set chost [getchanhost $whom $chan]] eq ""} {
    puthelp "NOTICE $nick :$whom is not on $chan"
    return 0
  }
  append say " $whom"

  if {[string match *b $do]} {
    if {[string match "*.irccloud.com" $chost]} {
      set mask *![lindex [split $chost @] 0]@*
    } else {  set mask [maskhost "$whom!$chost" 2]  }

    append say " ($mask"
    if {[llength $text]} {
      set rest [lassign $text exp]
      if {[regexp {^([1-9][0-9]{0,3})([smhd]?)$} $exp - num dur]} {
        if {$dur eq ""} {  set dur m  }

        set tcall [list timed:unban $mask $chan $nick $num $dur]
        if {$dur eq "d"} {  timer [expr {$dur * 1440}] $tcall
        } elseif {$dur eq "h"} {  timer [expr {$dur * 60}] $tcall
        } elseif {$dur eq "s"} {  utimer $num $tcall
        } else {  utimer [expr {$dur * 60}] $tcall  }

        append say " for $num$dur"
        set text $rest
      }
    }
    append say ")"
  }

  if {[string match k* $do]} {  set reason "Requested"
    if {[llength $text]} {  set reason [join $text]  }
    append say " --> With Reason: $reason"
  }

  putquick "NOTICE $nick :$say"

  if {[string match *b $do]} {  putserv "MODE $chan +b $mask"  }
  if {[string match k* $do]} {  putserv "KICK $chan $whom :$reason"  }
}


proc timed:unban {mask chan nick num dur} {
  if {[botisop $chan] && [ischanban $mask $chan]} {
    putserv "MODE $chan -b $mask"
  }
}


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Thu Jun 07, 2018 8:37 am    Post subject: Hello Reply with quote

can u write on this script and for the gline command !g nick 1h or 1d and gline goes to irccloud ident to quit user without infecting other user with same ip irccloud and other regular user with regular ip take gline on their real ip :
example: user with ircloud take a gline on *!ident@* and regular user on *@IP
ty in advance for ur help
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Thu Jun 07, 2018 9:27 am    Post subject: Reply with quote

Stefano1990

This is a kick/ban script.

Please check all of the included functions.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com


Last edited by SpiKe^^ on Thu Jun 07, 2018 9:31 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Thu Jun 07, 2018 9:30 am    Post subject: Reply with quote

Yes i understand , but i need like kb ban u make it and for gline with command example !g ted 1h Adversiting can u do it pls thx again
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Thu Jun 07, 2018 9:33 am    Post subject: Reply with quote

Yes i understand , but the script needs to be tested as it stands now.

This forum thread is about a kick/ban script.
Please check all of the included functions.

Working with the ircd as an oper is a different script and forum thread.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Thu Jun 07, 2018 3:07 pm    Post subject: Hello Reply with quote

Spike^^ yes my friend is work great and thx again for ur help ur amazing
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Sun Jun 10, 2018 12:35 pm    Post subject: Hello Reply with quote

Spike^^^ the last script for eggdrop u make it !kb !k !b nick is not work anymore why ?

and the first with !kb2 is work perfectly can u see the last script why is not work like !kb2 nick

maybe need to be the $whom = $whom3 and the $mask = $mask3 ?
thx in advance
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Sun Jun 10, 2018 5:34 pm    Post subject: Reply with quote

You said the script worked fine then "is not work anymore why ?"

Please explain what it is doing that it should not be doing.
Also explain what it isn't doing that it should be doing.

Paste all errors that the script may have generated.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 8
Location: Greccee

PostPosted: Sun Jun 10, 2018 6:45 pm    Post subject: Reply with quote

i think it is working cozz we have the same command on bot channel when quit out the channel bot is not work
nothing from this command is now work dont get make no one action and is not show me any notice what and why is not work any of all commands on script
example i make
!kb Test2 out
!k test2 out
!b test2

no one of this work and egddrop dont react to the comand of the script
and dont show me notice what is not work or what is wrong Sad

can eggdrrop give the command to the Channel Bot to give ban on irccloud ident and normal user without irccloud to hostmask like normaly on ip

here ur script is not recognise the command of eggdrop script u make only the channel bot

[18:53:07] <Alb> !k Test2
[18:53:11] <Alb> !kb Test2
[18:53:15] <Alb> !b Test2
[18:53:26] <~aL> !k test2 5
[18:53:27] * Test2 was kicked from #TEST by TEST (5)

[19:51:14] <~aL> !kb test2 20
[19:51:15] * Test2 was kicked from #TEST by TEST (20)
[19:51:15] * TEST sets mode: +b *!*@test-339B913C.irccloud.com

this is the first script with !kb2 is work

[18:54:08] <@aL> !kb2 Test2 Out
[18:54:09] * Rocky sets mode: +b *!uid290495@*
[18:54:09] >> BAN for nick Test2 <<
[18:54:10] * Test2 was kicked from #TEST by Rocky (Out)

Rocky is the eggdrop name
TEST channel name
_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 564
Location: Tennessee, USA

PostPosted: Mon Jun 11, 2018 12:10 am    Post subject: Reply with quote

Early testing shows this script working here. :)

I'll look more tomorrow.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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