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.

windop.tcl

Old posts that have not been replied to for several years.
Locked
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

windop.tcl

Post by Damnation85 »

i have been looking through the source of windop.tcl and modifing it to work how i want. i have contacted the author of the script and he has given me loads of help. unfortunatly he has become busy it seems so could anyone explain:

Code: Select all

	 if {[strlwr $chan] == "*"} {
	 	 set chan "owner"
	 }
what does this do ?

bind bot b EXP dop:botexp
bind bot b EXPR dop:botexpr


bind bot b DOPCHANSR dop:dopchans
bind bot b DOPCHANS dop:dopchansr

bind sign - * dop:dauthq
bind raw - 001 dop:dauthall
bind mode - * dop:mode
bind nick - * dop:chnick
bind time - "30 * * * *" dop:updatetopics
bind time - "00 * * * *" dop:updatetopics

these to i haven't seen these either

bind msg & pub and join and init_server i have seen and they are easy to fiqure out.


also i have added the networks services ChanServ to my bot as a friend and a op but it shows that its never been seen. and it still tries to kick it although i have said don't kick ops etc etc.

(SvBot) ChanServ no 0 fo never (nowhere )
(SvBot) HOSTS: services@darkmyst.org

is there a way for me to code my tcls so that if the host is services@darkmyst.org or nick is chanserv (u can't change your nick to that) don't kick,ban, msg etc etc basically completely ignore that user.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

if {[strlwr $chan] == "*"} {
set chan "owner"
}
This is basically comparing to values, if they are equal or not. Now $chan can be a channel named, working in a proc, on where the proc is triggered.

Say your bot is on channel #usa. This script triggers, there and $chan is defined as the channel where this triggers so $chan == #usa.

Now the bot can read #usa, as #Usa, #USA, #uSa, #usA or whatever. So what, 'strlwr' does, it converts all the alphabets to lower case,

So strlwr $anychar will give you a value of all alphabets into lower chars.
So strlwr $chan = #usa.

Now we have

if {#usa == "*"} {
set chan "owner"
}

#usa is not equal to "*"; #usa != "*"

So, then it will not execute. But however, if it $chan equals to "*" then it will run the if statement and set $chan to be a value "owner".

I don't see here why you are using string to lower, since if $chan contains "*", there is no need to convert it into lower case since it is not an alphabet.
also i have added the networks services ChanServ to my bot as a friend and a op but it shows that its never been seen. and it still tries to kick it although i have said don't kick ops etc etc.

(SvBot) ChanServ no 0 fo never (nowhere )
(SvBot) HOSTS: services@darkmyst.org

is there a way for me to code my tcls so that if the host is services@darkmyst.org or nick is chanserv (u can't change your nick to that) don't kick,ban, msg etc etc basically completely ignore that user.
First we have to know why is ChanServ being kicked by the bot? What kick message do you get?
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

Post by Damnation85 »

well i haven't had it today since i changed some channel settings i proberly had +bitch on or somthing not sure, but when chanserv oped somone the bot tried to deop/kick or somthing. i would see the message from the services saying that they cannot be deoped or kicked in the dcc chat with the bot. i just thought if i could somehow scan the chan if chanserv with host services@darkmyst.org exists in channel ignore that person.
so in users on channel/ops etc he would be ignored.
it gets constantly ignored via the bot from floods onjoin (ctcp) and when i had a anti flood script on the bot it'd join the channel getops then ban chanserv well try it'd place the ban but it is impossible for the service to be removed without me asking it to be removed.

if {[strlwr $chan] == "*"} {
set chan "owner"
}

so this isn't needed at all i knew what the string lowwer bit did and the compair i just didn't understand why it would try to match a channel to * and then set it to "owner"

what would help if the channel is set to owner?

i think i'll email the author about that one might shed some light, was just wondering if it was a eggdrop thing.
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

Post by Damnation85 »

Code: Select all

if {![passwdok $user ""]} {
	  	 if {![passwdok $user $pass]} {
	  	 	 puthelp "NOTICE $nick :[Svbot:lang $hand 19 "$user"]"
	  	 	 setuser $user xtra Svbot:auth 0
	  	 	 delhost $user "[getuser $user xtra Svbot:authnick]!*[Svbot:notild [getuser $user xtra Svbot:authhost]]"
	  	 	 setuser $user xtra Svbot:authhost "*"
	  	 	 setuser $user xtra Svbot:authnick ""
	  	 	 delhost $user "$nick !*[Svbot:notild $user]"

	  	 if {[passwdok $user $pass]} {
	  	 		 
	  	 	 puthelp "NOTICE $nick : inside the login if"
	  	 	 puthelp "NOTICE $nick :[Svbot:lang $hand 21 "$user"]"
	  	 	 setuser $user hosts "$nick!*[Svbot:notild $user]"
	  	 	 setuser $user xtra Svbot:auth 1
	  	 	 delhost $user "[getuser $user xtra Svbot:authnick]!*[Svbot:notild [getuser $user xtra Svbot:authhost]]"
	  	 	 setuser $user xtra Svbot:authhost $host
	  	 	 setuser $user xtra Svbot:authnick $nick
	  	 	 
	  	 	 
	  	   foreach chan [channels] {
	  	 	   switch -- [getuser $user xtra Svbot:$chan.automode] {
	  	 	 	   "op" { pushmode $chan +o $nick }
	  	 	 	   "voice" { pushmode $chan +v $nick }
          }
        } 
      }
    }
  }
well i have no idea why but after a nice lil reboot of the bot all of a sudden that code above failed now before it was working its apart of the login proc

it gets inside the first if.
i did a puthelp "NOTICE $nick :[passwdok $user $pass]" and it returned 1
i don't know whats up but the user and pass are correct.

a friend who also uses a bot said that hes had this problem and u have to remove the user file so i did that and started again (good thing it was only me and 1 other in it)
but the problem isn't sorted if anyone could shed some light on this problem i'd be rather thankful.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Is the kick message "Abusing Desynch" ?
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
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

Post by Damnation85 »

unfortunatly i don't remember but nodesynch = - and bitch
protectfriends +ops
dontkickops as well is a +

but it hasn't done it in a few days so maybe i changed a setting and fixed that.

i have been tracking down the login bug and i am a lil confused here

for example lets say my login should be

Damnation x

i type that in irc like so
/msg svbot login Damnation x

and i get :
-SvBot- 0
-SvBot- 0
-SvBot- 1

i should get :

"AUTHENTICATION SUCCESSFUL as Damnation."

no the user/pass part of the code is :

set user [join [lindex [split $arg] 0]]
set pass [join [lindex [split $arg] 1]]

the lines i have printing the -SvBot- parts are
puthelp "NOTICE $nick :[passwdok $user ""]"
puthelp "NOTICE $nick :[passwdok $user "-"]"
puthelp "NOTICE $nick :[passwdok $user $pass]"

i don't understand whats up the docs say :

passwdok <handle> <pass>
Description: checks the password given against the user's password.
Check against the password "" (a blank string) or "-" to find out
if a user has no password set.
Returns: 1 if the password matches for that user; 0 otherwise
Module: core

so by rights
if {[passwdok $user $pass]} {

should pass, but it isn't nor is
if {![passwdok $user $pass]} {

this has me very confused as it passes
if {![passwdok $user ""]} {

any help or information that can be given will be so gratefully taken
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

Post by Damnation85 »

i've given up on basing on somone elses code i am going to take a shot at coding it myself i have been looking through source looking at what people do and i have seen several of these

if { $host == "*" } { return 0 }

what is happening here?
i can see that if the host of the user is * return

but when would a host be * at any time.
is this peice of code necessary ?

thanx for your help.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

as far as I can recall (have to take a look at the source to confirm this), you get "*" as uhost on IRC event originating from the server (source_p in ircd code is server's name)
Locked