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.

I'm blocked

Old posts that have not been replied to for several years.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

I'm blocked

Post by Gatsby »

I don't know how could I make a system in the DCC Chat:
.csauth off which will disable the TCL
.csauth on which will enable it
could you help me with this please ? Thanks a lot guys

Code: Select all

### What is the name of the bot to identify to on join? 
set bot(name) "X" 

### Set the user of the Eggdrop that will use for CSAUTH 
set bot(user) "Robot" 

### Set the password of the Eggdrop that will use for CSAUTH 
set bot(pass) "absdefg" 

#####################################################################


bind join * * x:xlogin 

proc x:xlogin {nick uhost handle channel} { 
global bot botnick
if {$nick == $bot(name) || $nick == $botnick } { 
putserv "PRIVMSG $bot(name) :CSAUTH $bot(user) $bot(pass)"
} 
}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Bordom

Code: Select all

### What is the name of the bot to identify to on join? 
set bot(name) "X" 

### Set the user of the Eggdrop that will use for CSAUTH 
set bot(user) "Robot" 

### Set the password of the Eggdrop that will use for CSAUTH 
set bot(pass) "absdefg" 

### Set this to 1 if you want the script enabled by default, otherwise 0
set bot(enable) 1

##################################################################### 


bind join * * x:xlogin 

proc x:xlogin {nick uhost handle channel} { 
  global bot botnick
  if {(($nick == $bot(name)) || ($nick == $botnick)) && $bot(enable) == "1" } { 
    putserv "PRIVMSG $bot(name) :CSAUTH $bot(user) $bot(pass)" 
  } 
}

bind dcc - csauth c:csauth
proc x:csauth {hand idx arg} {
  global bot
  switch -exact -- [string tolower $arg] {
    {on} {
      set bot(enable) 1
      putdcc $idx "Enabled CSAUTH"
    }
    {off} {
      set bot(enable) 0
      putdcc $idx "Diabled CSAUTH"
    }
    deault {
      switch -- $bot(enabled) {
        {1} {
          putdcc $idx "CSAUTH is currently enabled"
        }
        default {
          putdcc $idx "CSAUTH is currently disabled"
        }
      }
    }
  }
}
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

Thank you for you quick reply, so I try and when i put .csauth on or .csauth off I have this :

Tcl error [c:csauth]: invalid command name "c:csauth"

I don't know what is wrong :-?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

replace from:

Code: Select all

proc x:csauth {hand idx arg} { 
to:

Code: Select all

proc c:csauth {hand idx arg} { 
and should be working fine..
Once the game is over, the king and the pawn go back in the same box.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

In deed it's working very well, thanks a lot Caesar :)
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

I have another question, it's stupid but I don't know how to do it...

So this is the contain of the csauth.tcl

Code: Select all

### What is the name of the bot to identify to on join? 
set bot(name) "X" 

### Set the user of the Eggdrop that will use for CSAUTH 
set bot(user) "Robot" 

### Set the password of the Eggdrop that will use for CSAUTH 
set bot(pass) "absdefg" 

### Set this to 1 if you want the script enabled by default, otherwise 0 
set bot(enable) 1 

##################################################################### 


bind join * * x:xlogin 

proc x:xlogin {nick uhost handle channel} { 
global bot botnick 
if {(($nick == $bot(name)) || ($nick == $botnick)) && $bot(enable) == "1" } { 
putserv "PRIVMSG $bot(name) :CSAUTH $bot(user) $bot(pass)" 
} 
} 

bind dcc - csauth c:csauth 
proc c:csauth {hand idx arg} { 
global bot 
switch -exact -- [string tolower $arg] { 
{on} { 
set bot(enable) 1 
putdcc $idx "Enabled CSAUTH" 
} 
{off} { 
set bot(enable) 0 
putdcc $idx "Diabled CSAUTH" 
} 
deault { 
switch -- $bot(enabled) { 
{1} { 
putdcc $idx "CSAUTH is currently enabled" 
} 
default { 
putdcc $idx "CSAUTH is currently disabled" 
} 
} 
} 
} 
}
This TCL sends /msg X CSAUTH FreeBSD absdefg and it works very well thanks to ppslim and caesar.

I have another bot which name is Y and I would like that Robot sends an CSAUTH to Y this TCL would be named csauth2.tcl
I tried to copy and past but I think the variables are the same so I don't know what can I change, if anybody could help me.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Won't this be easier if you place the X and Y login in the same file? If yes, you can do the folowing changes to the code and will work smoothly.

Code: Select all

### What is the name of the bot to identify to on join? 
set bot(name) "X Y" 

### Set the user of the Eggdrop that will use for CSAUTH 
set bot(user) "Robot" 

### Set the password of the Eggdrop that will use for CSAUTH 
set bot(pass) "absdefg" 

### Set this to 1 if you want the script enabled by default, otherwise 0 
set bot(enable) 1 

bind join * * x:xlogin 

proc x:xlogin {nick uhost handle channel} { 
  global bot botnick 
  if {[lsearch -exact $bot(name) $nick] != -1 || ($nick == $botnick) && $bot(enable) == "1" } { 
  foreach luser $bot(name) {
  putserv "PRIVMSG $luser :CSAUTH $bot(user) $bot(pass)" 
  }
 }
}
Once the game is over, the king and the pawn go back in the same box.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

Yes you have right caesar but I didn't told you the use, I explain me :

Code: Select all

/msg X CSAUTH Robot absdefg
This is ok.

And I would :

Code: Select all

/msg Y AUTH #channel Robot absdefg
as you can see the syntax changes a little bit that's why I would like to make two different files and variables but I don't know how to.

Thanks to answer to my questions caesar you're very cool
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

So you want it to login to Y for only one channel or for more than one?
Once the game is over, the king and the pawn go back in the same box.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

So to X just 1 channel and to Y a maximum of 5 channels

Sorry I'm so newbie... thank you very much for helping me :oops:

I'm french and my english is not perfect sorry too :oops:
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

### What is the name of the bot to identify to on join? 
set bot(name) "X"

### What is the name of the bot you want to do the channel login?
set bot(chan) "Y"

### Set the user of the Eggdrop that will use for CSAUTH 
set bot(user) "Robot" 

### Set the password of the Eggdrop that will use for CSAUTH 
set bot(pass) "absdefg" 

### Set this to 1 if you want the script enabled by default, otherwise 0 
set bot(enable) 1 

# stuff
setudef flag auth
bind join * * x:csauth
bind dcc - csauth dcc:csauth

# stuff
setudef flag auth
bind join * * x:csauth
bind dcc - csauth dcc:csauth

proc x:csauth {nick uhost handle channel} { 
global bot botnick 
if {$nick == $botnick && $bot(enable) == "1" } { 
foreach luser $bot(name) {
putserv "PRIVMSG $luser :CSAUTH $bot(user) $bot(pass)" 
}
foreach chan [channels] {
if {[channel get $chan auth]} {
putserv "PRIVMSG $bot(chan) :AUTH $chan $bot(user) $bot(pass)" 
}
}
}
}
For the channels you want it to login to Y do an .chanset #channel +auth. By default it is disabled foreach channels, you must enable it in order to work.
Once the game is over, the king and the pawn go back in the same box.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

Your code seems very nice but could you list all the commands I can use with it ?

I know :

.+chanset #test Successfully set modes { +auth } on #test.

But the other commands I tried doesn't work and I don't know them :

.auth on What? You need '.help'
.csauth on Tcl error [dcc:csauth]: invalid command name "dcc:csauth"

You're very helpfull (I never seen that I admire you! :) )
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oups.. forgot to paste that two. My appologies. Replace from:

Code: Select all

proc c:csauth {hand idx arg} { 
to this:

Code: Select all

proc dcc:csauth {hand idx arg} { 
Also, the *auth* thing is just an channel flag, not an dcc command.
Once the game is over, the king and the pawn go back in the same box.
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

Okay but what are the commands to enable or disabel the CSAUTh or AUTH syntax ? Or remove a channel from AUTH ?
G
Gatsby
Voice
Posts: 20
Joined: Sun Apr 13, 2003 8:38 am

Post by Gatsby »

I corrected like that but I couldn't find the hand idx arg... are you sure of your code ?

Code: Select all

### What is the name of the bot to identify to on join?
set bot(name) "X"

### What is the name of the bot you want to do the channel login?
set bot(chan) "Y"

### Set the user of the Eggdrop that will use for CSAUTH
set bot(user) "Robot"

### Set the password of the Eggdrop that will use for CSAUTH
set bot(pass) "absdefg"

### Set this to 1 if you want the script enabled by default, otherwise 0
set bot(enable) 1

# stuff
setudef flag auth
bind join * * x:csauth
bind dcc - csauth dcc:csauth

# stuff
setudef flag auth
bind join * * x:csauth
bind dcc - csauth dcc:csauth

proc dcc:csauth {hand idx arg} { 
global bot botnick
if {$nick == $botnick && $bot(enable) == "1" } {
foreach luser $bot(name) {
putserv "PRIVMSG $luser :CSAUTH $bot(user) $bot(pass)"
}
foreach chan [channels] {
if {[channel get $chan auth]} {
putserv "PRIVMSG $bot(chan) :AUTH $chan $bot(user) $bot(pass)"
}
}
}
}
.csauth on Tcl error [dcc:csauth]: can't read "nick": no such variable
.csauth off Tcl error [dcc:csauth]: can't read "nick": no such variable

I'm losted...
Locked