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 

Request script - Beta

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Apr 14, 2006 6:40 pm    Post subject: Request script - Beta Reply with quote

Hey, i have been fixing my request script for a long time now, time to re-release it.

Request v1.12
Download Here

It has been tested, please note clonescan is in beta stage, and may not work 100%. The shitlist managment proc has to be rewritten, so another update will be coming soon. It would be great if you guys could maybe test the script a little bit, and i will look forward to your feedback.

Thanks guys,
Chris!
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Apr 19, 2006 4:44 am    Post subject: Reply with quote

I had a look at your script and i think it's sad that eventhough you've almost completely ripped my script (which isn't a suprise) you STILL manage to script useless things.

<tosserbashing>
Let me just show you some things:

request:

Code:
  # This is the global flag which will be used to identify any bots
  variable botflag "b|"


well what do you know, did you even realise that only bots in the botnet have this flag?

Code:
  if {[string match -nocase "$request::channel" "$request::reqchan"]} {
    putserv "NOTICE $nickname :Nice try, please dont abuse the request system."
    return 0
  }


Did you even consider the possibility that it's just alot smarter to just use:

Code:
if {[validchan $request:reqchan]} {


So let's move on

Code:
  utimer 30 [list request::timeout $nickname [set channel $request::reqchan]]
  if {$request::shitlist == "1"} {
    set shitlist [open $request::shitfile r]
    if {$shitlist == ""} {
      putlog "Channel $request::reqchan is not shitlisted."
      request::start $nickname [set channel $request::reqchan]
    } else {
      set data [split [read $shitlist] \n]
      if {[llength $data] == "1"} {
        if {[string match -nocase $request::reqchan [lindex [split $data] 0]]} {
          putserv "NOTICE $nickname :Request failed: $request::reqchan is currently shitlisted."
          putlog "Channel $request::reqchan is shitlisted."
          close $shitlist
          unset data
          } else {
            close $shitlist
            unset data
            request::start $nickname [set channel $request::reqchan]
          }
      } else {
        set found "0"
        foreach schan [split $data] {
          if {$schan == ""} { return }
          if {[string match -nocase $request::reqchan [lindex [split $schan] 0]]} {
            set found "1"
            break
          }
        }
        if {$found == "1"} {
          putserv "NOTICE $nickname :Request failed: $request::reqchan is currently shitlisted."
          putlog "Channel $request::reqchan is shitlisted."
          close $shitlist
          unset data
        } else {
          request::start $nickname [set channel $request::reqchan]
          close $shitlist
          unset data
        }
      }
    }
  } elseif {$request::shitlist == "0"} {
    request::start $nickname [set channel $request::reqchan]
  }


What exactly is all this useless stuff. Why not do the remote smart thing and simply loop through it once instead of using multiple if's which prove to be really useless.

Also, why do you keep using [set channel $request::reqchan], what is the point of this? You don't even use the variable channel.

This is probably one of the messiest codes ever. You don't even appear to close the file if the 'shitlist' is empty.

I'll do you a favor by showing you what real TCL is like:

Code:
if {$request::shitlist} {
  set shitlist [open $request::shitfile r]; set lines [split [read $shitlist] \n]; close $shitlist
  set found 0
  foreach channel $lines {
    # I will assume that you atleast know how to write a file properly.
    if {[string equal -nocase $channel $request::reqchan]} {
      set found 1; break
    }
  }
  if {$found} {
    putserv "NOTICE $nickname :Request failed: $request::reqchan is currently shitlisted."
    putlog "Channel $request::reqchan is shitlisted."
  } else {
    start $nickname $request::reqchan
  }
} else {
  start $nickname $request::reqchan
}


Oh wow, this does the exact same as your big useless piece of scripting.

Code:
  utimer 10 [list request::request2 $nickname $channel]


Why are you using a 10 second utimer to trigger a check, do you even know for sure that the eggdrop has finished doing it's WHO's and it's MODE's? No you don't. I would have expected that you learned from ripping my script but i guess you didn't. at all.

Code:
proc request::request2 {nickname channel} {
  set request::reqchan $channel
  if {![onchan $nickname $request::reqchan]} {
    putserv "NOTICE $nickname :Request failed: You are not on $request::reqchan."
    channel remove $request::reqchan
    set request::request "0"
    putlog "$nickname is not at $request::reqchan."
  } else {
    putlog "$nickname is at $request::reqchan."
    utimer 5 [list request::opcheck $nickname $request::reqchan]
  }
}


Now you probably haven't got the slighest clue how IRC works but i can assure you that IF and only IF the bot has already found out who the users on the channels are then the eggdrop will already know if the user is opped or voiced or neither aswell, the mere fact that you invoke a 5 second timer to check for op shows me that you have absolutely no clue at all.

Also, your setting of request::reqchan is pointless.

I won't even comment on the following procs as what i just said above this pretty much applies: request::opcheck, request::botcheck, request::service.

Your clonescanner is also a piece of useless scripting, there are much easier and more efficient ways of checking for multiple users from the same hosts.

Now we move on to the next proc, request::accepted.

Code:
proc request::accepted {nickname channel} {
  set request::reqchan $channel
  # Request is now accepted, so you need to send a message to a random bot through a botnet
  # please note, if you dont want to send this message though a botnet, then modify this part of the script as required
  set rbot [channel get $request::channel rbot]
  if {$::request::service} {
    if {[onchan L $request::reqchan]} {
      set service "L"
    } else {
      set service "Q"
    }
    putquick "PRIVMSG $request::adminchan :$rbot requestadd [set text "$request::reqchan $nickname $service"]"
    putlog "Request accepted for $request::reqchan by $nickname. Bot $rbot will join. \(Service: $service\)"
  } else {
    putquick "PRIVMSG $request::adminchan :$rbot requestadd [set text "$request::reqchan $nickname"]"
    putlog "Request accepted for $request::reqchan by $nickname. Bot $rbot will join."
  }
  putserv "NOTICE $nickname :Request accepted: Bot $rbot should join shortly"
  putlog "Request: - Accepted - $request::reqchan - $nickname\([getchanhost $nickname $request::reqchan]\) - $rbot will join -"
  channel remove $request::reqchan
  set request::request "0"
}


And oh my god, this proc checks for services AGAIN. I mean come on, were you sleeping when you were writing this?
You talk about a botnet part, which isn't there, at all. You comment on a 'random bot' which isn't even allowed by your scripting.

You simply use some kind of debugging script to add the bot to a channel by making it invoke a procedure, did it EVER cross your mind that not ALL bots have debug scripts, nevermind public debug scripts and even less bots have debug scripts that have binds on their current nicknames.

You again use [set text] but i won't go into that because i've already told you that it's pointless and dumb.

So now, we move on to request-leaf:

At this point i'm getting concerned if my post will even get through because it's quite long so far already.

Code:
setudef str service

proc requestadd {channel nickname {service ""}} {
  if {![validchan $channel]} {
    channel add $channel
  }
  if {[info exists service]} {
    channel set $channel service "$service"
  }
  if {[validuser [nick2hand $nickname]]} {
    chattr [nick2hand $nickname] |+almnov $channel
    putserv "NOTICE $nickname :Hello $nickname. You are now the owner of $channel. Your handle is [nick2hand $nickname] and you are added with the hostname [getuser [nick2hand $nickname] hosts]."
    if {$service != ""} {
      putserv "NOTICE $nickname :For me to function properly, please add me to [channel get $channel service] on $channel with +amo. /msg [channel get $channel service] chanlev $channel $::botnick +amo."
    }
  } else {
    set hostname [getchanhost $nickname $channel]
    if {[string match -nocase "*users.quakenet.org" "$hostname"]} {
      set hostname "*!*@[lindex [split $hostname @] 1]"
    } else {
      set hostname "*!$hostname"
    }
    adduser $nickname $hostname
    chattr $nickname |+almnov $channel
    putserv "NOTICE $nickname :Hello $nickname. You are now the owner of $channel. Your handle is [nick2hand $nickname] and you are added with the hostname [getuser [nick2hand $nickname] hosts]."
    if {$service != ""} {
      putserv "NOTICE $nickname :For me to function properly, please add me to [channel get $channel service] on $channel with +amo. /msg [channel get $channel service] chanlev $channel $::botnick +amo."
    }
  }
}


This is your 'leaf' 'script'.

(also, please note that you defined an variable containing +ao in request.tcl which incidently you don't use at all. And you request +amo in this script)

A much better, more compact and generally more common sense kind of code would be:

Code:
setudef str service

proc requestadd {channel nickname {service ""}} {
  if {![validchan $channel]} {
    channel add $channel
  }
  if {![validuser [set hand [nick2hand $nickname]]]} {
    set host [expr {[string match *users.quakenet.org* [set host [getchanhost $nickname]]] ? "*!*@[lindex [split $host @] 1]" : "[string map {~ *} *!$host]"}]
    if {![validuser $nickname]} {
      adduser [set hand $nickname] $host
    } else {
      # add a random number from 0-99 to limit the odds of the nickname occuring again
      adduser [set hand $nickname[rand 100]] $host
    }
  }
  # we don't need to define +lmno because eggdrop adds that by default upon +n
  chattr $hand |+an $channel
  putserv "NOTICE $nickname :Hello $nickname. You are now the owner of $channel. Your handle is [nick2hand $nickname] and you are added with the hostname [getuser [nick2hand $nickname] hosts]."
  if {[llength $service]} {
    # so because you claimed +ao, let's not be lame and ask for +ao.
    putserv "NOTICE $nickname :For me to function properly, please add me to $service on $channel with +ao. /msg $service chanlev $channel $::botnick +ao."
    channel set $channel $service
  }
}


</tosserbashing>

I hope this was the last time you posted scripts that are ripped from my somewhat older scripts. It's getting quite annoying to see you 'release' scripts that you ripped, tried to rewrite and horribly fail. It's even worse when you come to this forum asking for help on them.

Since you asked for feedback, here was mine. I hope this provides you with a lesson.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Wed Apr 19, 2006 10:06 am    Post subject: Reply with quote

actually, that script was written from scratch, i didn't even look at your script. And its my script, so i can use 20,000 or 30,000 if statements if i like. I might have ripped from you before, but i dont rip from your scripts now, i dont even have you script anymore, it was so crap i decided to write this one. More advanced...
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Apr 19, 2006 11:37 am    Post subject: Reply with quote

Tosser^^ wrote:
actually, that script was written from scratch, i didn't even look at your script. And its my script, so i can use 20,000 or 30,000 if statements if i like. I might have ripped from you before, but i dont rip from your scripts now, i dont even have you script anymore, it was so crap i decided to write this one. More advanced...


Actually with the exception of your 'shitlist' or whatever you would call it, there was nothing more advanced about it except for the fact that it used alot of procs to do things you could have done with 1 proc very easily.
Back to top
View user's profile Send private message
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Wed Apr 26, 2006 11:55 am    Post subject: Reply with quote

Doesn't work for me Rolling Eyes
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Thu Apr 27, 2006 6:51 am    Post subject: Reply with quote

Any error messages, everyone using my script has not reported any problems...

Im doing a rewrite of the code, so you have a choice of !request #channel or /msg botnick request #channel and a new botmanagment system. So, a new release soon.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Thu Apr 27, 2006 4:10 pm    Post subject: Reply with quote

No error Messages, but the requested Bot doesn't join the channel, after checking it.
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Apr 27, 2006 6:10 pm    Post subject: Reply with quote

Code:
.set errorInfo

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
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 Apr 28, 2006 4:34 am    Post subject: Reply with quote

Yes. Well im working on a total new bot managment system, so any problems with bots not joining channels wont be a issue in the next version.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Sun Jan 07, 2007 1:50 pm    Post subject: Reply with quote

Hello Tosser^^ have you al fixt the script .
or do you know there are another scripts like this, with request and leaf?
greets
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 Jan 07, 2007 8:43 pm    Post subject: Reply with quote

Currently on the way to making a botnet request script. No eta of when it will be done as i hardly have time for TCL nowadays. I'll try and get it completed within the next 2/3 weeks so keep posted.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
whiteshark
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: netherlands

PostPosted: Thu Feb 01, 2007 2:50 pm    Post subject: Reply with quote

Quote:
Currently on the way to making a botnet request script. No eta of when it will be done as i hardly have time for TCL nowadays. I'll try and get it completed within the next 2/3 weeks so keep posted.


are you already with the scripts i will test it Razz
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 Support & Releases 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