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-Problem with my script - I need your help

Old posts that have not been replied to for several years.
Locked
T
Tcl-N00b

Tcl-Problem with my script - I need your help

Post by Tcl-N00b »

Hello,
i have a problem with my tcl-skript...
[21:49:07] <@arena7|Blacky> !addnotice test_test
In the Database is standing: test_test_(arena7|Blacky)-(Fri Jul 16 21:43:37 CEST 2004)
But, if i type !all (@ skript) he gives me all in a wrong way... als spaces are new lines.. :(
[21:52:27] <@eSport4ever> test = test (arena7|Blacky)-(Fri
[21:52:28] <@eSport4ever> Jul =
[21:52:29] <@eSport4ever> 16 =
[21:52:31] <@eSport4ever> 21:43:37 =
[21:52:33] <@eSport4ever> CEST =
[21:52:35] <@eSport4ever> 2004) =

Code: Select all


proc notice:showall { nick u handle channel t } {
  global notice
  if { [lsearch -exact [split [string tolower $notice(channels)]] [string tolower $channel]] < 0 } {
    return 0
  }
  if {![matchattr $handle [string trim $notice(glob_flag)]|[string trim $notice(chan_flag)] $channel]} {
    putnotc $nick "You can't see all notices from my database."
    return 0
  }
  set fs [open "noticedatabase" r]
  set data [read $fs]
  if { [string trim [string trim $data \n]] == "" } {
    putserv "privmsg $channel : There is no notice"
  } else {
    foreach line [split $data \n] {
      foreach eintrag $line {
        set a [lindex [split $eintrag _] 0]
        set b [lindex [split $eintrag _] 1]
        set c [lindex [split $eintrag _] 2]
        set d "$a = $b $c"
        putserv "privmsg $channel : $d"
      }
    }
  }
  close $fs
}
Please remember: I am german (english is not well) and i am a tcl noob... it were nice, if you paste me the right script here :)
If you need more from the script please say it :-)

I need you help
T
Tcl-N00b

Post by Tcl-N00b »

Hmm thx... :/ ... But now the Problem is .... [dont know the english word for "gelöst".... :-)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Geduld Tcl-N00b, you cannot expect an immediate answer.

The word you're looking for is "get lost". :P
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

No. He was looking for "solved" ;)
Seems he doesn't need help any more.
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

maybe create the index right also

instead of adding all that _ crap for spaces .. when u write an arg add {} arround it so when you read it out tcl will think of it as one arg example

{id} {something else} {whatever}

then split on \n do foreach {a b c} [split [read $fs] \n] ...

* instead of useing lindex

then id will be a something else will be b and whatever will be c
see simple .. just add {} when you write to the db
XplaiN but think of me as stupid
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Thanks arcane, I misread "gelöst" for poor English ie. "gelost" = "get lost". LOL

I really should wake up before I browse forums. :roll:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

:D
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked