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.

Ideas?

Old posts that have not been replied to for several years.
Locked
g
galaxyboy

Post by galaxyboy »

Hi,

Does anyone knows how to code a script such that when I use .partall (or some other command in DCC partyline), the bot would leave all channel it is in without rejoining back because of the existing channel records the bot once joined?

And is there anyway to code it such that it would restore all existing channel records once i use the command .joinall again?

If it is possible to code, can someone help me with it? I'm not sure with the coding :smile:

Thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OK, lets make a .partall and a .resetall commands to do the job

Code: Select all

bind dcc n partall my:partall
proc my:partall {hand idx arg} {
  foreach _A [channels] {
    channel set $_A +inactive
  }
  putdcc $idx "Set channels [string trim [join [channels] ", "] ", "] inactive"
}

bind dcc n resetall my:resetall
proc my:resetall {hand idx arg} {
  foreach _A [channels] {
    channel set $_A -inactive
  }
  putdcc $idx "Re-activated channels [string trim [join [channels] ", "] ", "]"
}
}
g
galaxyboy

Post by galaxyboy »

Hi ppslim :smile:

Thanks for coding the script for me. It works!

By the way, can I know how did you learn coding tcl other than reading tcl-commands.doc? You mention in other post that you read tcl helpfile? Where can i get a copy? Which IRC network are you in? :smile:

Err, one more help needed :smile: Is there anyway I can add a part message for .partall? If yes, how can it be done?

Hopefully you can help me again :smile: I'm newbie to tcl. Hehe

Thanks :smile:)


<font size=-1>[ This Message was edited by: galaxyboy on 2001-11-14 21:29 ]</font>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As far as I am aware, you can't add a part message to the partall command, at least not without confusing the bot.

Well, you answered the question yourself, I basicaly learned Tcl from reading tcl-commands.doc, the Tcl helpfiles (known as man pages) and reading through other script. For those of you on windows, you can download a windows help file from http://www.ppslim.ukshells.co.uk/netbots/tcl83.hlp (under GPL of course). For a web-based version, visit http://tcl.activestate.com/man/tcl8.3/T ... ntents.htm
Locked