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.

Netsplit & . dcc chat command problem in superbitch.tcl

Old posts that have not been replied to for several years.
Locked
User avatar
esix
Voice
Posts: 39
Joined: Thu Aug 12, 2004 11:16 am
Location: [esix@localhost]
Contact:

Netsplit & . dcc chat command problem in superbitch.tcl

Post by esix »

Hello all,

This is a superbitch code that i made (with help from some friends).

Code: Select all

bind mode - "*+o*" bitch
set chans "*"

proc bitch {nick uhost hand chan mode target} {
 global botnick chans; set handle [nick2hand $target $chan]
 if {([lsearch -exact [split [string tolower $chans]] [string tolower $chan]] != -1) || ($chans == "*")} {
  if {([string match "*+o*" $mode]) && (![string equal -nocase $nick $botnick]) && (![string equal -nocase $target $botnick]) && ([botisop $chan])} {
   if {(![matchattr $hand fbomn|fbomn $chan]) && ([matchattr $handle bomn|omn $chan])} { return 0 }
    if {([matchattr $hand bomn|omn $chan])} { return 0 }
     if {(![wasop $target $chan])} {
       putquick "KICK $chan $nick :Permission Denied ;-)"
       putquick "KICK $chan $target :Permission Denied ;-)"
      }
    }
  }
}
Now still, there are some things that are missing and i can't find a way to make them work. I would like a dcc chat command. So that superbitch.tcl will work only on that channels that were setted.
Example: .netchanset #chan1 +superbitch
And then the superbitch.tcl would work only on that channel. And on all other channels that i would set them like this.
Can anyone please help me with this?
P.S. That netsplit in post subject is mistake.
Thanks,
esix
The End
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

You can define a channel flag with 'setudef', like

Code: Select all

setudef flag superbitch
And then use 'channel get' to read it

Code: Select all

channel get $chan superbitch
Hope this helps.
User avatar
esix
Voice
Posts: 39
Joined: Thu Aug 12, 2004 11:16 am
Location: [esix@localhost]
Contact:

Post by esix »

Can you be a bit more specific please? :oops:
The End
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

bind mode - "*+o*" bitch
set chans "*"

# define channel flag
setudef flag superbitch

proc bitch {nick uhost hand chan mode target} {
 global botnick chans; set handle [nick2hand $target $chan]

  if {![channel get $chan superbitch]} {
    # chan is not set +superbitch, do nothing
    return
  }

 if {([lsearch -exact [split [string tolower $chans]] [string tolower $chan]] != -1) || ($chans == "*")} {
  if {([string match "*+o*" $mode]) && (![string equal -nocase $nick $botnick]) && (![string equal -nocase $target $botnick]) && ([botisop $chan])} {
   if {(![matchattr $hand fbomn|fbomn $chan]) && ([matchattr $handle bomn|omn $chan])} { return 0 }
    if {([matchattr $hand bomn|omn $chan])} { return 0 }
     if {(![wasop $target $chan])} {
       putquick "KICK $chan $nick :Permission Denied ;-)"
       putquick "KICK $chan $target :Permission Denied ;-)"
      }
    }
  }
} 
User avatar
esix
Voice
Posts: 39
Joined: Thu Aug 12, 2004 11:16 am
Location: [esix@localhost]
Contact:

Post by esix »

thanks qb, i'll test it in a moment :)

works fine, thank you qb! :)
u make my day :wink:
The End
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Hmmm... I think I coded that one, a guy used to bug me on msn alot for something very similar to this, yeah its me I always use split with lsearch, heh okay.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
esix
Voice
Posts: 39
Joined: Thu Aug 12, 2004 11:16 am
Location: [esix@localhost]
Contact:

Post by esix »

awyeah wrote:Hmmm... I think I coded that one, a guy used to bug me on msn alot for something very similar to this, yeah its me I always use split with lsearch, heh okay.
yeah, as i said, with help from friends :roll: Also i don't know why in public u say bugged, but when we were talking u didn't say nothing like that? Smarta$$ probably. U won't get your reputation multipler raised :evil:
The End
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Not really, people who keep asking for something which is impossible and want to enhace something working perfect to something ridiculous, moreover they won't follow the instructions which I give, only want me to do everything and which I refuse todo, then I might call them bugging me. I don't charge you I just do it for free and when I am free.
- Keep that in mind. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
esix
Voice
Posts: 39
Joined: Thu Aug 12, 2004 11:16 am
Location: [esix@localhost]
Contact:

Post by esix »

i will. no problem :) peace ! :D
The End
Locked