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.

TCL script Help

Help for those learning Tcl or writing their own scripts.
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

thanks worked great expect the half op bit hehe also any idea on how 2 get my bot to resolve my sites host name, some times it wont work :(

thanks guys
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Linux wrote:
nml375 wrote:@Linux:
With that code, you'd have to be both opped and halfopped + have ol flags.
If you read my post again i will be very thankful, one thing i would like to tell you;

Usage:
'||' = OR
'&&' = AND


If users are added in the Bot as Op/Halfop then it is NOT nesassary to be OP(@) or Halfop(%) on channel too because Bot recon them with their flags and If users are not added then they SHOULD be OP(@) or Halfop(%) on channel.

Thats the reason i apply all the conditions with the flags "lo" or "Channel Op" or "Halfop".

Regards.
And yet again I refer to De Morgan's theorem...
Proc will abort if any of the above tests fail, thus you must be opped, halfopped, and be added as a user with either o or l flags...
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

so what ur saying is if they aint opp'd in the channel they have to be on the bot.....

but i just want it to work for just opps in channel, dragins script qorked before til i reinstalled eggdrop :(

and its the same config file so cant be tht
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Ace-@:
In order to add users, either use .adduser or .+user
See .help for both these commands for info on how to use them.
You probably also wish to check out .chattr and .whois
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

what i dont understand is why is worked before and now it wont its getting a real pain.... here is the code

Code: Select all

package require http

bind pub - !user stats
proc stats {n u h c a} {

if {![matchattr $h o|o $c] || ![isop $n $c]} { return }

set nick [lindex [split $a] 0]

if {$nick!=""} {

set data [::http::geturl www.xxxxxxxxxxx?search=$nick]
foreach line [split [::http::data $data] \n] {

putquick "PRIVMSG #acetorrents $line"
}
::http::cleanup $data
}
}
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

As I recall, you got it working last time once you removed "|| ![isop $n $c]", as suggested by DragnLord?
Also, have you verified your bot sees your ppl as opped/+o users (using .channel <yourchannel>?
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

yes it shows ppl as ops
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Does it also show them as registered users with op-privileges?
(since the code you last posted requires users to be both opped and added as +o users)
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

yes it does thts why i cant understand this
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

post the result of .whois username, so we can see a representative example of what the bot's showing for that particular handle/username
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

err... that is odd indeed
Think you could split the conditionals into separate if-statements and add some debug-printouts?
ie:

Code: Select all

if {![matchattr $h o|o $c]} {
 puthelp "PRIVMSG $c :No privileges for $n ($h)"
 return
}
if {![isop $n $c]} {
 puthelp "PRIVMSG $c :Not opped: $n ($h)"
 return
}
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

#Ace-T# whois ace-t
HANDLE PASS NOTES FLAGS LAST
Ace-T yes 0 hjlmnoptx 14:17 (partyline)
#acetorrents - 12:27
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

sorry to double post

i get Not opped: Ace-T (Ace-T)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

From the output of .channel <yourchannel>, is there a @ in front of your nick?
NML_375
A
Ace-T
Halfop
Posts: 82
Joined: Tue Aug 29, 2006 7:25 am

Post by Ace-T »

i dont but some ov my other staff do but it aint working for them either...

so how can i delete ppl from bot and add them with correct privs and i think tht should work *shrugs*
Post Reply