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 

sicherheit scripts
Goto page Previous  1, 2, 3  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Jul 22, 2005 5:11 pm    Post subject: Reply with quote

Well.

Code:
proc clone:scan {host chan} {
  set fp [open "clonescan.$chan" a]
  foreach host {[chanlist $chan]} {
    set host *!*@[lindex [split $host "@"] 1]
    puts $fp $host
  }
  close $fp
  clone:check $host $chan
}

proc clone:check {host chan} {
  set fp [open "clonescan.$chan" r]
  set data [read -nonewline $fp]
  close $fp
  set hosts [split $data "\n"]
  foreach host {[chanlist $chan]} {
    set host *!*@[lindex [split $host "@"] 1]
    if {[string match "$host" $hosts]} {
      inc clones($chan) 1
    }
  }
}


Thats basic. Just a file and a string match. But hopefully it works. I havn't tested it yet. Oh, and nice script metriod never noticed you made it this morning.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Jul 22, 2005 5:44 pm    Post subject: Reply with quote

let me enlighten you on a very important subject: if you don't test your code - and I don't think you've ever tested a single line written by yourself - it's basically the same if you believe you can drive since you have seen other people drive, having never driven a car yourself

for starters, [chanlist] doesn't return a host list, it returns a nick list, so your code is absolutely disfunctional

and apparently you haven't bothered to consider what I suggested to you earlier, about file access and maintaining list structures in memory... remember? I even wrote an example of that, especially for you
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Jul 22, 2005 6:19 pm    Post subject: Reply with quote

that memory stuff is complicated for me. I will loke through a guide to find out more. Then i will correct my script. I need to change:

Code:
foreach host {[chanlist $chan]} {
    set host *!*@[lindex [split $host "@"] 1]
    puts $fp $host
  }

To
Code:
foreach nick {[chanlist $chan]} {
    set host [getchanhost $nick $chan
    set host *!*@[lindex [split $host "@"] 1]
    puts $fp $host
  }


Then if you could please help me more of this memory stuff i could ditch that puts fp and the file stuff and just use memory. Im not good with this memory stuff. Then, can i still use string match with this memory stuff to match any hosts. Also, how can i increase a variable by 1. Thanks for your help so far, im willing to learn more about this memory stuff and get this script tested and completed. Also maybe a antipjen-drone script if you could help with that aswell. Trying my best ;p.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jul 23, 2005 3:11 am    Post subject: Reply with quote

precisely which part of this you did not understand?
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sat Jul 23, 2005 11:56 am    Post subject: Reply with quote

Code:

foreach nick {[chanlist $chan]} {
    set host [getchanhost $nick $chan]
    set host *!*@[lindex [split $host "@"] 1]
    }
set clonescan($channel) {}
foreach hosts {[$host]} {
    if {[set idx [lsearch $clonescan($chan) $hosts]] != -1} {
      lset $clonescan($channel) $idx $hosts
}
}
set clonecheck 1
if {$clonecheck} {
foreach hostcheck {[$hosts]} {
if {[string match "$hostcheck" "$clonescan($channel)"]} {
incr clones($channel)
}
}
}


Ok, I read some guides and made this simple script. Hopefully it works. Demond can you check that code is correct as you know alot about data structures in memory. Atleast i tryed Very Happy.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sat Jul 23, 2005 12:15 pm    Post subject: Reply with quote

TEST IT YOURSELF AND FIND OUT IF ITS CORRECT.
Back to top
View user's profile Send private message
Dizzle
Op


Joined: 28 Apr 2005
Posts: 109

PostPosted: Sat Jul 23, 2005 1:08 pm    Post subject: Reply with quote

man tosser learn too test ot out yourself dude, 90 % of your post are filled with question "is this code alright, i dont want too test it"
_________________
What's this real life ppl keep talking about ??? And where can I download it ???
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sat Jul 23, 2005 5:37 pm    Post subject: Reply with quote

Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sat Jul 23, 2005 8:50 pm    Post subject: Reply with quote

this should let you pick a random bot
Code:
set randombot [lindex [bots] [rand [llength [bots]]]]
Back to top
View user's profile Send private message Send e-mail
rt
Voice


Joined: 08 Jul 2005
Posts: 25

PostPosted: Sun Jul 24, 2005 6:18 am    Post subject: Reply with quote

Tosser^^ wrote:
Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.


i recall you from IRC miethering me like mad to create you a clonescan
Back to top
View user's profile Send private message
^DooM^
Owner


Joined: 26 Aug 2003
Posts: 772
Location: IronForge

PostPosted: Sun Jul 24, 2005 8:19 am    Post subject: Reply with quote

rt wrote:
Tosser^^ wrote:
Ok. I have tested the script but got some errors which i can fix myself. But, can anyone tell me how i can get a random bot to join the channel.


i recall you from IRC miethering me like mad to create you a clonescan


He does that a lot Wink
_________________
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Back to top
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Jul 24, 2005 9:50 am    Post subject: Reply with quote

oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
rt
Voice


Joined: 08 Jul 2005
Posts: 25

PostPosted: Sat Jul 30, 2005 8:58 am    Post subject: Reply with quote

Tosser^^ wrote:
oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.


please please refrase that.

You mess me around, I ban you.

And I'm banned on 19 bots, like I care? Get out more, please. Smile
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jul 30, 2005 11:05 am    Post subject: Reply with quote

rt wrote:
Tosser^^ wrote:
oh no. not rt. The one how banned me on all the #antipjen bots because he didnt get his own way. what a loser he is. And now he has got himself banned on 19 bots on 153 channels.

Thanks for that random bot code greenbear.


please please refrase that.

You mess me around, I ban you.

And I'm banned on 19 bots, like I care? Get out more, please. Smile


in case you haven't noticed, here you are not on your local qnet ban discussion forum, so better stick to the topic(s)
Back to top
View user's profile Send private message Visit poster's website
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sat Jul 30, 2005 11:54 am    Post subject: Reply with quote

carefull demond, or everyone will ban you on quakenet

Razz Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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