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.

psyBNC --> Administration with eggdrop?

Old posts that have not been replied to for several years.
Locked
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

psyBNC --> Administration with eggdrop?

Post by tessa1 »

Hi,

-Eggdrop is connected with psyBNC
-Eggdrop is admin on psyBNC

Is the following possible?
Why doesn't work that script?

Code: Select all

bind pub - !adduser adduser_msg
proc adduser_msg {nick uhost hand chan args} {
  if {[lindex $args 0] == ""} { puthelp "notice $nick :Syntax !adduser <nick> " ; return 0 }
  set brand [lrange $args 0 end]
  putquick "PRIVMSG -psybnc adduser $args :Bouncer.by.Some.net"
  return 1
}
thx for answers
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Re: psyBNC --> Administration with eggdrop?

Post by ^DooM^ »

tessa1 wrote:Hi,

-Eggdrop is connected with psyBNC
-Eggdrop is admin on psyBNC

Is the following possible?
Why doesn't work that script?

Code: Select all

bind pub - !adduser adduser_msg
proc adduser_msg {nick uhost hand chan args} {
  if {[lindex $args 0] == ""} { puthelp "notice $nick :Syntax !adduser <nick> " ; return 0 }
  set brand [lrange $args 0 end]
  putquick "PRIVMSG -psybnc adduser $args :Bouncer.by.Some.net"
  return 1
}
thx for answers
You should not use args for a start. use arg

then with your lindex use this

Code: Select all

[lindex [split $arg] 0]
This will properly sort your list for you.
Also what are you doing with brand? you have put all of your passed arguments into $brand then did nothing with it. again with lrange you should use

Code: Select all

[lrange [split $arg] 0 end]
Lastly are you sure you can privmsg -psybnc like that?
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
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

ok...thx the following works

Code: Select all

bind pub - !adduser adduser_msg
proc adduser_msg {nick uhost hand chan arg} {
  if {[lindex [split $arg] 0] == ""} { puthelp "notice $nick :Syntax: !adduser <nick> " ; return 0 }
   putquick "PRIVMSG -psyBNC :adduser $arg :Bouncer.by.Some.net"
  return 1
}

bind pub - !deluser deluser_msg
proc deluser_msg {nick uhost hand chan arg} {
  if {[lindex [split $arg] 0] == ""} { puthelp "notice $nick :Syntax: !deluser <nick> " ; return 0 }
   putquick "PRIVMSG -psyBNC :deluser $arg"
  return 1
}

Good, now i want to transfer the password via eggdrop to $arg,
but don't know how i can extract the password 'nnendmpo' from a partyline chatwindow and send it to the added user. :cry:


The following text is published at the partyline:
[01:55:55] <botnick> [13:56] <<tessa1>> !tessa1! !adduser testnick
[01:55:56] <botnick> [13:56] [-psyBNC!psyBNC@lam3rz.de] Sun Jun 12 13:56:15 :New User:testnick (Bouncer.by.Some.net) added by botnick [01:55:56] <botnick> [13:56] [-psyBNC!psyBNC@lam3rz.de] Neuer Nutzer 'testnick' hinzugefuegt. Password auf 'nnendmpo' eingestellt
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

make a msg or msgm bind for psy and extract the value via scan or regex. also possible is to split the line into a list and trim the ' around the list element.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

thx, thats a good idea :)
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

Sorry, thats to difficult for me and the following is bullshit i think :oops:

Code: Select all

bind msgm - "*" proc:msg
proc proc:msg {nick uhost hand arg} {
set line [string trim $arg]
puthelp "privmsg $nick :$line"
return 1
}
i have no idea how to integrate this in the script and split and regex and scan and trim and ...lalala :shock:

Geht über meinen Horizont ;)
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

i rather meant something like that:

Code: Select all

bind msg - "Neuer" proc:msg

proc proc:msg {nick uhost hand arg} {
   if { $nick == "-psyBNC" && $uhost == "psyBNC@lam3rz.de" } {
      puthelp "privmsg $::lastnick :Das Passwort für den neuen Account ist [lindex [split $arg] 5]"
      return 1
   }
   return 0
}
you should save ::lastnick when requesting the psybnc account ;).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

you should save ::lastnick when requesting the psybnc account

hmm, how can I save ::lastnick ?


set lastnick $nick :?:

Tcl error [proc:msg]: can't read "::lastnick": no such variable

sorry I don't know how
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

if I am talking about ::lastnick, you shouldn't try to save as lastnick, should you? ;)
the diffrenze between these are that ::lastnick is a global var while lastnick is procedure specific (unless its made global an other way).

so just add after
putquick "PRIVMSG -psyBNC :adduser $arg :Bouncer.by.Some.net"
some line like:
set ::lastnick $nick
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

well :D

many thanks for ur help...works

Great Forum
Locked